mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
- restored 1.5.2 compatibility (sorry, eric)
- removed __all__ cruft from internal modules (sorry, skip) - don't assume ASCII for string escapes (sorry, per)
This commit is contained in:
parent
ae7636753e
commit
f2989b22ff
5 changed files with 39 additions and 31 deletions
|
@ -195,11 +195,12 @@ SRE_INFO_LITERAL = 2 # entire pattern is literal (given by prefix)
|
|||
SRE_INFO_CHARSET = 4 # pattern starts with character from given set
|
||||
|
||||
if __name__ == "__main__":
|
||||
import string
|
||||
def dump(f, d, prefix):
|
||||
items = d.items()
|
||||
items.sort(lambda a, b: cmp(a[1], b[1]))
|
||||
for k, v in items:
|
||||
f.write("#define %s_%s %s\n" % (prefix, k.upper(), v))
|
||||
f.write("#define %s_%s %s\n" % (prefix, string.upper(k), v))
|
||||
f = open("sre_constants.h", "w")
|
||||
f.write("""\
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue