summaryrefslogtreecommitdiffstats
path: root/Lib/sre_constants.py
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2001-02-18 12:05:16 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2001-02-18 12:05:16 (GMT)
commitf2989b22fff921b3394e1709a07f0119370b6d74 (patch)
treee7d820eea66d169e543ac117631694d3afbccbcd /Lib/sre_constants.py
parentae7636753e15273742515eb123999d23f6b7985e (diff)
downloadcpython-f2989b22fff921b3394e1709a07f0119370b6d74.zip
cpython-f2989b22fff921b3394e1709a07f0119370b6d74.tar.gz
cpython-f2989b22fff921b3394e1709a07f0119370b6d74.tar.bz2
- restored 1.5.2 compatibility (sorry, eric)
- removed __all__ cruft from internal modules (sorry, skip) - don't assume ASCII for string escapes (sorry, per)
Diffstat (limited to 'Lib/sre_constants.py')
-rw-r--r--Lib/sre_constants.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/sre_constants.py b/Lib/sre_constants.py
index 7aedab1..b429a33 100644
--- a/Lib/sre_constants.py
+++ b/Lib/sre_constants.py
@@ -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("""\
/*