diff options
author | Guido van Rossum <guido@python.org> | 2007-10-16 18:12:55 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-10-16 18:12:55 (GMT) |
commit | 3172c5d263eeffff1e89d03d79be3ccc1d60fbde (patch) | |
tree | a35e103b36b684c4682ded57236199d6a0ecee4b /Lib/xmlrpclib.py | |
parent | 60d241f135f10312f5a638846659d7e471f6cac9 (diff) | |
download | cpython-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/xmlrpclib.py')
-rw-r--r-- | Lib/xmlrpclib.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/xmlrpclib.py b/Lib/xmlrpclib.py index e08d405..efb0a7b 100644 --- a/Lib/xmlrpclib.py +++ b/Lib/xmlrpclib.py @@ -294,7 +294,7 @@ class DateTime: """ def __init__(self, value=0): - if not isinstance(value, basestring): + if not isinstance(value, str): if datetime and isinstance(value, datetime.datetime): self.value = value.strftime("%Y%m%dT%H:%M:%S") return @@ -653,7 +653,7 @@ class Marshaller: write("<value><struct>\n") for k, v in value.items(): write("<member>\n") - if not isinstance(k, basestring): + if not isinstance(k, str): raise TypeError("dictionary key must be string") write("<name>%s</name>\n" % escape(k)) dump(v, write) @@ -1031,7 +1031,7 @@ def dumps(params, methodname=None, methodresponse=None, encoding=None, # standard XML-RPC wrappings if methodname: # a method call - if not isinstance(methodname, basestring): + if not isinstance(methodname, str): methodname = methodname.encode(encoding) data = ( xmlheader, |