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/ConfigParser.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/ConfigParser.py')
-rw-r--r-- | Lib/ConfigParser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py index e12717d..d32eae0 100644 --- a/Lib/ConfigParser.py +++ b/Lib/ConfigParser.py @@ -554,7 +554,7 @@ class ConfigParser(RawConfigParser): depth = MAX_INTERPOLATION_DEPTH while depth: # Loop through this until it's done depth -= 1 - if value.find("%(") != -1: + if "%(" in value: try: value = value % vars except KeyError, e: @@ -562,7 +562,7 @@ class ConfigParser(RawConfigParser): option, section, rawval, e[0]) else: break - if value.find("%(") != -1: + if "%(" in value: raise InterpolationDepthError(option, section, rawval) return value |