diff options
Diffstat (limited to 'Lib/xml/dom/minicompat.py')
| -rw-r--r-- | Lib/xml/dom/minicompat.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/xml/dom/minicompat.py b/Lib/xml/dom/minicompat.py index de4cb4f..62725c6 100644 --- a/Lib/xml/dom/minicompat.py +++ b/Lib/xml/dom/minicompat.py @@ -40,12 +40,7 @@ __all__ = ["NodeList", "EmptyNodeList", "StringTypes", "defproperty"] import xml.dom -try: - unicode -except NameError: - StringTypes = type(''), -else: - StringTypes = type(''), type(unicode('')) +StringTypes = (str,) class NodeList(list): @@ -100,7 +95,7 @@ class EmptyNodeList(tuple): def defproperty(klass, name, doc): - get = getattr(klass, ("_get_" + name)).im_func + get = getattr(klass, ("_get_" + name)) def set(self, value, name=name): raise xml.dom.NoModificationAllowedErr( "attempt to modify read-only attribute " + repr(name)) |
