]> granicus.if.org Git - python/commitdiff
String method conversion.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 9 Feb 2001 10:30:23 +0000 (10:30 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 9 Feb 2001 10:30:23 +0000 (10:30 +0000)
Lib/sre_constants.py

index b429a33cbf0aa99ae0ef909458e7bf4200b0ad97..7aedab15724de0186c018a718920344b06d00f95 100644 (file)
@@ -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("""\
 /*