Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 624ab7c commit 3992db8Copy full SHA for 3992db8
1 file changed
Lib/xml/dom/pulldom.py
@@ -2,11 +2,6 @@
2
import xml.sax.handler
3
import types
4
5
-try:
6
- _StringTypes = [types.StringType, types.UnicodeType]
7
-except AttributeError:
8
- _StringTypes = [types.StringType]
9
-
10
START_ELEMENT = "START_ELEMENT"
11
END_ELEMENT = "END_ELEMENT"
12
COMMENT = "COMMENT"
@@ -330,7 +325,7 @@ def characters(self, chars):
330
325
def parse(stream_or_string, parser=None, bufsize=None):
331
326
if bufsize is None:
332
327
bufsize = default_bufsize
333
- if type(stream_or_string) in _StringTypes:
328
+ if isinstance(stream_or_string, basestring):
334
329
stream = open(stream_or_string)
335
else:
336
stream = stream_or_string
0 commit comments