Skip to content

Commit 5e08b48

Browse files
committed
Fix bug
1 parent bca1380 commit 5e08b48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/locale.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,10 @@ def format_string(f, val, grouping=False, monetary=False):
215215
Grouping is applied if the third parameter is true.
216216
Conversion uses monetary thousands separator and grouping strings if
217217
forth parameter monetary is true."""
218+
global _percent_re
218219
if _percent_re is None:
219220
import re
220221

221-
global _percent_re
222222
_percent_re = re.compile(r'%(?:\((?P<key>.*?)\))?(?P<modifiers'
223223
r'>[-#0-9 +*.hlL]*?)[eEfFgGdiouxXcrs%]')
224224

0 commit comments

Comments
 (0)