diff options
author | Raymond Hettinger <python@rcn.com> | 2004-05-04 09:21:43 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-05-04 09:21:43 (GMT) |
commit | bac788a3cd348203a5fdabba52e5faf65bf35c5e (patch) | |
tree | 3c5bfe8295936ad51df617ef0fd053ebac684357 /Lib/keyword.py | |
parent | c5e378da41641d5bc1e9b5c6c11bd470ff90b3e3 (diff) | |
download | cpython-bac788a3cd348203a5fdabba52e5faf65bf35c5e.zip cpython-bac788a3cd348203a5fdabba52e5faf65bf35c5e.tar.gz cpython-bac788a3cd348203a5fdabba52e5faf65bf35c5e.tar.bz2 |
Replace str.find()!=1 with the more readable "in" operator.
Diffstat (limited to 'Lib/keyword.py')
-rwxr-xr-x | Lib/keyword.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/keyword.py b/Lib/keyword.py index a0295e2..223a88a 100755 --- a/Lib/keyword.py +++ b/Lib/keyword.py @@ -63,7 +63,7 @@ def main(): while 1: line = fp.readline() if not line: break - if line.find('{1, "') > -1: + if '{1, "' in line: match = strprog.search(line) if match: lines.append(" '" + match.group(1) + "',\n") |