Mercurial > babel > old > babel-test
diff babel/messages/frontend.py @ 507:b29ff192b610 stable-0.9.x
Python 2.3 compatibility: backporting r456 and r457 to 0.9 branch (see #233)
author | fschwarz |
---|---|
date | Fri, 04 Mar 2011 13:14:03 +0000 |
parents | 06dab6ec802c |
children | 4a5340c0821b |
line wrap: on
line diff
--- a/babel/messages/frontend.py +++ b/babel/messages/frontend.py @@ -1176,8 +1176,9 @@ def parse_keywords(strings=[]): """Parse keywords specifications from the given list of strings. - >>> kw = parse_keywords(['_', 'dgettext:2', 'dngettext:2,3']) - >>> for keyword, indices in sorted(kw.items()): + >>> kw = parse_keywords(['_', 'dgettext:2', 'dngettext:2,3']).items() + >>> kw.sort() + >>> for keyword, indices in kw: ... print (keyword, indices) ('_', None) ('dgettext', (2,))