summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-01-24 11:44:18 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-01-24 11:44:18 (GMT)
commit7ff241d830ff3a840fea08aeeaf83c6535338fae (patch)
tree615c2e1d49997ef939755bc5a6b0817efa0653e3 /Lib
parent51f4616f6eefe4077f15be43b5749b3b24385b59 (diff)
parent33f7cdd9751b23b4ab5b9419c1209dc30c86fa39 (diff)
downloadcpython-7ff241d830ff3a840fea08aeeaf83c6535338fae.zip
cpython-7ff241d830ff3a840fea08aeeaf83c6535338fae.tar.gz
cpython-7ff241d830ff3a840fea08aeeaf83c6535338fae.tar.bz2
Fix generating of sre_constants.h on Python 3.
Diffstat (limited to 'Lib')
-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 6cf69c3..417670b 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")