summaryrefslogtreecommitdiff
path: root/Lib/keyword.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-09 09:10:35 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-02-09 09:10:35 +0000
commit1dd6ea10c96f222fc0d8607cdba705e441d85b65 (patch)
tree3adcafc16fca75a4d1e22d29742ddb5aefa3b773 /Lib/keyword.py
parent2ae8b7f00bd114a86ad2b1837b88db32765b44cd (diff)
downloadcpython-1dd6ea10c96f222fc0d8607cdba705e441d85b65.tar.gz
String method conversion.
Diffstat (limited to 'Lib/keyword.py')
-rwxr-xr-xLib/keyword.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/keyword.py b/Lib/keyword.py
index 003e6521e5..d331d911ba 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__":