summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/ccompiler.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/distutils/ccompiler.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/distutils/ccompiler.py')
-rw-r--r--Lib/distutils/ccompiler.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py
index c33e5ab..f4edb7c 100644
--- a/Lib/distutils/ccompiler.py
+++ b/Lib/distutils/ccompiler.py
@@ -154,7 +154,7 @@ class CCompiler:
self.set_executable(key, value)
def set_executable(self, key, value):
- if isinstance(value, basestring):
+ if isinstance(value, str):
setattr(self, key, split_quoted(value))
else:
setattr(self, key, value)
@@ -175,8 +175,8 @@ class CCompiler:
for defn in definitions:
if not (isinstance(defn, tuple) and
(len(defn) in (1, 2) and
- (isinstance (defn[1], basestring) or defn[1] is None)) and
- isinstance (defn[0], basestring)):
+ (isinstance (defn[1], str) or defn[1] is None)) and
+ isinstance (defn[0], str)):
raise TypeError(("invalid macro definition '%s': " % defn) + \
"must be tuple (string,), (string, string), or " + \
"(string, None)")
@@ -318,7 +318,7 @@ class CCompiler:
"""
if outdir is None:
outdir = self.output_dir
- elif not isinstance(outdir, basestring):
+ elif not isinstance(outdir, str):
raise TypeError("'output_dir' must be a string or None")
if macros is None:
@@ -415,7 +415,7 @@ class CCompiler:
"""
if output_dir is None:
output_dir = self.output_dir
- elif not isinstance(output_dir, basestring):
+ elif not isinstance(output_dir, str):
raise TypeError("'output_dir' must be a string or None")
if macros is None:
@@ -494,7 +494,7 @@ class CCompiler:
if output_dir is None:
output_dir = self.output_dir
- elif not isinstance(output_dir, basestring):
+ elif not isinstance(output_dir, str):
raise TypeError("'output_dir' must be a string or None")
return (objects, output_dir)