diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-02-09 09:10:35 (GMT) |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-02-09 09:10:35 (GMT) |
commit | ee5e61d3bc127c9d3c6ac752b2d381718da910ef (patch) | |
tree | af65794ead4be0e72339123db3ccf98f23f80bd8 /Lib/keyword.py | |
parent | 6b71e747b19c41e0665ee14eb755c924a40dd774 (diff) | |
download | cpython-ee5e61d3bc127c9d3c6ac752b2d381718da910ef.zip cpython-ee5e61d3bc127c9d3c6ac752b2d381718da910ef.tar.gz cpython-ee5e61d3bc127c9d3c6ac752b2d381718da910ef.tar.bz2 |
String method conversion.
Diffstat (limited to 'Lib/keyword.py')
-rwxr-xr-x | Lib/keyword.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/keyword.py b/Lib/keyword.py index 003e652..d331d91 100755 --- a/Lib/keyword.py +++ b/Lib/keyword.py @@ -52,7 +52,7 @@ for keyword in kwlist: iskeyword = kwdict.has_key def main(): - import sys, re, string + import sys, re args = sys.argv[1:] iptfile = args and args[0] or "Python/graminit.c" @@ -66,7 +66,7 @@ def main(): while 1: line = fp.readline() if not line: break - if string.find(line, '{1, "') > -1: + if line.find('{1, "') > -1: match = strprog.search(line) if match: lines.append(" '" + match.group(1) + "',\n") @@ -89,7 +89,7 @@ def main(): # write the output file fp = open(optfile, 'w') - fp.write(string.join(format, '')) + fp.write(''.join(format)) fp.close() if __name__ == "__main__": |