mirror of
https://github.com/python/cpython.git
synced 2025-08-24 10:45:53 +00:00
Fix generating of sre_constants.h on Python 3.
This commit is contained in:
parent
6b102f251f
commit
385ecd84c8
1 changed files with 1 additions and 2 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue