summaryrefslogtreecommitdiffstats
path: root/Lib/xml
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-06-11 21:38:39 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2007-06-11 21:38:39 (GMT)
commit5de48bdd195b14426c772b4c61290aef7f33e3ec (patch)
treee4411088f62f76b183b18d543b4c4b64d4076d65 /Lib/xml
parent80bfb725af0809308264d526ac6a024fc8386643 (diff)
downloadcpython-5de48bdd195b14426c772b4c61290aef7f33e3ec.zip
cpython-5de48bdd195b14426c772b4c61290aef7f33e3ec.tar.gz
cpython-5de48bdd195b14426c772b4c61290aef7f33e3ec.tar.bz2
Simplify various spots where: str() is called on something
that already is a string or the existence of the str class is checked or a check is done for str twice. These all stem from the initial unicode->str replacement.
Diffstat (limited to 'Lib/xml')
-rw-r--r--Lib/xml/dom/minicompat.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/xml/dom/minicompat.py b/Lib/xml/dom/minicompat.py
index e2a2bca..c0a797e 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:
- str
-except NameError:
- StringTypes = type(''),
-else:
- StringTypes = type(''), type(str(''))
+StringTypes = (str,)
class NodeList(list):