summaryrefslogtreecommitdiffstats
path: root/Lib/ConfigParser.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-10-16 18:12:55 (GMT)
committerGuido van Rossum <guido@python.org>2007-10-16 18:12:55 (GMT)
commit3172c5d263eeffff1e89d03d79be3ccc1d60fbde (patch)
treea35e103b36b684c4682ded57236199d6a0ecee4b /Lib/ConfigParser.py
parent60d241f135f10312f5a638846659d7e471f6cac9 (diff)
downloadcpython-3172c5d263eeffff1e89d03d79be3ccc1d60fbde.zip
cpython-3172c5d263eeffff1e89d03d79be3ccc1d60fbde.tar.gz
cpython-3172c5d263eeffff1e89d03d79be3ccc1d60fbde.tar.bz2
Patch# 1258 by Christian Heimes: kill basestring.
I like this because it makes the code shorter! :-)
Diffstat (limited to 'Lib/ConfigParser.py')
-rw-r--r--Lib/ConfigParser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py
index faa0930..167b963 100644
--- a/Lib/ConfigParser.py
+++ b/Lib/ConfigParser.py
@@ -271,7 +271,7 @@ class RawConfigParser:
Return list of successfully read files.
"""
- if isinstance(filenames, basestring):
+ if isinstance(filenames, str):
filenames = [filenames]
read_ok = []
for filename in filenames:
@@ -652,7 +652,7 @@ class SafeConfigParser(ConfigParser):
def set(self, section, option, value):
"""Set an option. Extend ConfigParser.set: check for string values."""
- if not isinstance(value, basestring):
+ if not isinstance(value, str):
raise TypeError("option values must be strings")
# check for bad percent signs:
# first, replace all "good" interpolations