summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac/plistlib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-05-02 19:09:54 (GMT)
committerGuido van Rossum <guido@python.org>2007-05-02 19:09:54 (GMT)
commitef87d6ed94780fe00250a551031023aeb2898365 (patch)
tree1f8989aaaec7ec5f8b2f26498317f2022bf85531 /Lib/plat-mac/plistlib.py
parent572dbf8f1320c0b34b9c786e5c30ba4a4b61b292 (diff)
downloadcpython-ef87d6ed94780fe00250a551031023aeb2898365.zip
cpython-ef87d6ed94780fe00250a551031023aeb2898365.tar.gz
cpython-ef87d6ed94780fe00250a551031023aeb2898365.tar.bz2
Rip out all the u"..." literals and calls to unicode().
Diffstat (limited to 'Lib/plat-mac/plistlib.py')
-rw-r--r--Lib/plat-mac/plistlib.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/plat-mac/plistlib.py b/Lib/plat-mac/plistlib.py
index 0daf3b5..b040237 100644
--- a/Lib/plat-mac/plistlib.py
+++ b/Lib/plat-mac/plistlib.py
@@ -70,7 +70,7 @@ def readPlist(pathOrFile):
usually is a dictionary).
"""
didOpen = 0
- if isinstance(pathOrFile, (str, unicode)):
+ if isinstance(pathOrFile, (str, str)):
pathOrFile = open(pathOrFile)
didOpen = 1
p = PlistParser()
@@ -85,7 +85,7 @@ def writePlist(rootObject, pathOrFile):
file name or a (writable) file object.
"""
didOpen = 0
- if isinstance(pathOrFile, (str, unicode)):
+ if isinstance(pathOrFile, (str, str)):
pathOrFile = open(pathOrFile, "w")
didOpen = 1
writer = PlistWriter(pathOrFile)
@@ -231,7 +231,7 @@ class PlistWriter(DumbXMLWriter):
DumbXMLWriter.__init__(self, file, indentLevel, indent)
def writeValue(self, value):
- if isinstance(value, (str, unicode)):
+ if isinstance(value, (str, str)):
self.simpleElement("string", value)
elif isinstance(value, bool):
# must switch for bool before int, as bool is a
@@ -270,7 +270,7 @@ class PlistWriter(DumbXMLWriter):
self.beginElement("dict")
items = sorted(d.items())
for key, value in items:
- if not isinstance(key, (str, unicode)):
+ if not isinstance(key, (str, str)):
raise TypeError("keys must be strings")
self.simpleElement("key", key)
self.writeValue(value)