summaryrefslogtreecommitdiff
path: root/Lib/sre_constants.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-01-24 13:43:02 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2013-01-24 13:43:02 +0200
commitf366f3b9ad345500c1cfa2e86ba2840895eec76a (patch)
treeb89a6d1fb2fa10d9a21be233c11b5d0318a11f67 /Lib/sre_constants.py
parent7d6979b48229d676bd3fdfce9dcf6ffa066ea40f (diff)
downloadcpython-f366f3b9ad345500c1cfa2e86ba2840895eec76a.tar.gz
Fix generating of sre_constants.h on Python 3.
Diffstat (limited to 'Lib/sre_constants.py')
-rw-r--r--Lib/sre_constants.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/sre_constants.py b/Lib/sre_constants.py
index 6cf69c321b..417670bf8d 100644
--- a/Lib/sre_constants.py
+++ b/Lib/sre_constants.py
@@ -219,8 +219,7 @@ SRE_INFO_CHARSET = 4 # pattern starts with character from given set
if __name__ == "__main__":
def dump(f, d, prefix):
- items = d.items()
- items.sort(key=lambda a: a[1])
+ items = sorted(d.items(), key=lambda a: a[1])
for k, v in items:
f.write("#define %s_%s %s\n" % (prefix, k.upper(), v))
f = open("sre_constants.h", "w")