diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-24 11:43:46 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-24 11:43:46 (GMT) |
commit | 33f7cdd9751b23b4ab5b9419c1209dc30c86fa39 (patch) | |
tree | f6bb1b99fbdb7ce941e959a3f8117e73315bb6af /Lib | |
parent | c1a7c565aaf1dfa573337bbc9a5222097252cf3b (diff) | |
parent | 385ecd84c8e450ace7accaaf2bcfe48b5622bc62 (diff) | |
download | cpython-33f7cdd9751b23b4ab5b9419c1209dc30c86fa39.zip cpython-33f7cdd9751b23b4ab5b9419c1209dc30c86fa39.tar.gz cpython-33f7cdd9751b23b4ab5b9419c1209dc30c86fa39.tar.bz2 |
Fix generating of sre_constants.h on Python 3.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/sre_constants.py | 3 |
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") |