summaryrefslogtreecommitdiffstats
path: root/Lib/xml/sax
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2002-05-31 20:46:39 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2002-05-31 20:46:39 (GMT)
commitab199622905b2621b2ad9abcb324fb5f124cc12f (patch)
treeb9f78d40a05178f73cc76669fffc1bc7707d2d58 /Lib/xml/sax
parent3f8dae73c74d2a0a0aa55c1669f73e0d6ab827e1 (diff)
downloadcpython-ab199622905b2621b2ad9abcb324fb5f124cc12f.zip
cpython-ab199622905b2621b2ad9abcb324fb5f124cc12f.tar.gz
cpython-ab199622905b2621b2ad9abcb324fb5f124cc12f.tar.bz2
Use more string methods, remove import string
Diffstat (limited to 'Lib/xml/sax')
-rw-r--r--Lib/xml/sax/__init__.py6
-rw-r--r--Lib/xml/sax/expatreader.py7
2 files changed, 6 insertions, 7 deletions
diff --git a/Lib/xml/sax/__init__.py b/Lib/xml/sax/__init__.py
index f119d84..6b1b1ba 100644
--- a/Lib/xml/sax/__init__.py
+++ b/Lib/xml/sax/__init__.py
@@ -58,14 +58,14 @@ _false = 0
if _false:
import xml.sax.expatreader
-import os, string, sys
+import os, sys
if os.environ.has_key("PY_SAX_PARSER"):
- default_parser_list = string.split(os.environ["PY_SAX_PARSER"], ",")
+ default_parser_list = os.environ["PY_SAX_PARSER"].split(",")
del os
_key = "python.xml.sax.parser"
if sys.platform[:4] == "java" and sys.registry.containsKey(_key):
- default_parser_list = string.split(sys.registry.getProperty(_key), ",")
+ default_parser_list = sys.registry.getProperty(_key).split(",")
def make_parser(parser_list = []):
diff --git a/Lib/xml/sax/expatreader.py b/Lib/xml/sax/expatreader.py
index d641c19..e541824 100644
--- a/Lib/xml/sax/expatreader.py
+++ b/Lib/xml/sax/expatreader.py
@@ -25,7 +25,6 @@ from xml.sax import xmlreader, saxutils, handler
AttributesImpl = xmlreader.AttributesImpl
AttributesNSImpl = xmlreader.AttributesNSImpl
-import string
import weakref
# --- ExpatLocator
@@ -220,7 +219,7 @@ class ExpatParser(xmlreader.IncrementalParser, xmlreader.Locator):
self._cont_handler.endElement(name)
def start_element_ns(self, name, attrs):
- pair = string.split(name)
+ pair = name.split()
if len(pair) == 1:
pair = (None, name)
else:
@@ -228,7 +227,7 @@ class ExpatParser(xmlreader.IncrementalParser, xmlreader.Locator):
newattrs = {}
for (aname, value) in attrs.items():
- apair = string.split(aname)
+ apair = aname.split()
if len(apair) == 1:
apair = (None, aname)
else:
@@ -240,7 +239,7 @@ class ExpatParser(xmlreader.IncrementalParser, xmlreader.Locator):
AttributesNSImpl(newattrs, {}))
def end_element_ns(self, name):
- pair = string.split(name)
+ pair = name.split()
if len(pair) == 1:
pair = (None, name)
else: