Patch# 1258 by Christian Heimes: kill basestring.
I like this because it makes the code shorter! :-)
diff --git a/Lib/xml/dom/pulldom.py b/Lib/xml/dom/pulldom.py
index c15618f..81a36b0 100644
--- a/Lib/xml/dom/pulldom.py
+++ b/Lib/xml/dom/pulldom.py
@@ -325,7 +325,7 @@
def parse(stream_or_string, parser=None, bufsize=None):
if bufsize is None:
bufsize = default_bufsize
- if isinstance(stream_or_string, basestring):
+ if isinstance(stream_or_string, str):
stream = open(stream_or_string)
else:
stream = stream_or_string
diff --git a/Lib/xml/sax/saxutils.py b/Lib/xml/sax/saxutils.py
index a4bcb08..a569c1d 100644
--- a/Lib/xml/sax/saxutils.py
+++ b/Lib/xml/sax/saxutils.py
@@ -272,7 +272,7 @@
"""This function takes an InputSource and an optional base URL and
returns a fully resolved InputSource object ready for reading."""
- if isinstance(source, basestring):
+ if isinstance(source, str):
source = xmlreader.InputSource(source)
elif hasattr(source, "read"):
f = source