comparison 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
comparison
equal deleted inserted replaced
505:06dab6ec802c 507:b29ff192b610
1174 return (method_map, options_map) 1174 return (method_map, options_map)
1175 1175
1176 def parse_keywords(strings=[]): 1176 def parse_keywords(strings=[]):
1177 """Parse keywords specifications from the given list of strings. 1177 """Parse keywords specifications from the given list of strings.
1178 1178
1179 >>> kw = parse_keywords(['_', 'dgettext:2', 'dngettext:2,3']) 1179 >>> kw = parse_keywords(['_', 'dgettext:2', 'dngettext:2,3']).items()
1180 >>> for keyword, indices in sorted(kw.items()): 1180 >>> kw.sort()
1181 >>> for keyword, indices in kw:
1181 ... print (keyword, indices) 1182 ... print (keyword, indices)
1182 ('_', None) 1183 ('_', None)
1183 ('dgettext', (2,)) 1184 ('dgettext', (2,))
1184 ('dngettext', (2, 3)) 1185 ('dngettext', (2, 3))
1185 """ 1186 """
Copyright (C) 2012-2017 Edgewall Software