summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-09 10:30:23 (GMT)
committerEric S. Raymond <esr@thyrsus.com>2001-02-09 10:30:23 (GMT)
commitbe18552874ec6d4b70f94c0f03b58ddef690bf49 (patch)
tree281674b8ab9d67835ded7a99468396dd119ab857
parentc9838f9fcbf138b454606d606f7b53a5be21b5ae (diff)
downloadcpython-be18552874ec6d4b70f94c0f03b58ddef690bf49.zip
cpython-be18552874ec6d4b70f94c0f03b58ddef690bf49.tar.gz
cpython-be18552874ec6d4b70f94c0f03b58ddef690bf49.tar.bz2
String method conversion.
-rw-r--r--Lib/sre_constants.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/sre_constants.py b/Lib/sre_constants.py
index b429a33..7aedab1 100644
--- a/Lib/sre_constants.py
+++ b/Lib/sre_constants.py
@@ -195,12 +195,11 @@ 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, string.upper(k), v))
+ f.write("#define %s_%s %s\n" % (prefix, k.upper(), v))
f = open("sre_constants.h", "w")
f.write("""\
/*