Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 33f7cdd

Browse files
Fix generating of sre_constants.h on Python 3.
2 parents c1a7c56 + 385ecd8 commit 33f7cdd

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Lib/sre_constants.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ def makedict(list):
219219

220220
if __name__ == "__main__":
221221
def dump(f, d, prefix):
222-
items = d.items()
223-
items.sort(key=lambda a: a[1])
222+
items = sorted(d.items(), key=lambda a: a[1])
224223
for k, v in items:
225224
f.write("#define %s_%s %s\n" % (prefix, k.upper(), v))
226225
f = open("sre_constants.h", "w")

0 commit comments

Comments
 (0)