Patch# 1258 by Christian Heimes: kill basestring.
I like this because it makes the code shorter! :-)
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 @@
"""
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 @@
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 @@
# 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,