summaryrefslogtreecommitdiffstats
path: root/Lib/pickletools.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/pickletools.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/pickletools.py')
-rw-r--r--Lib/pickletools.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/pickletools.py b/Lib/pickletools.py
index 7fdcb70..b4b2840 100644
--- a/Lib/pickletools.py
+++ b/Lib/pickletools.py
@@ -431,7 +431,7 @@ def read_unicodestringnl(f):
raise ValueError("no newline found when trying to read "
"unicodestringnl")
data = data[:-1] # lose the newline
- return unicode(data, 'raw-unicode-escape')
+ return str(data, 'raw-unicode-escape')
unicodestringnl = ArgumentDescriptor(
name='unicodestringnl',
@@ -467,7 +467,7 @@ def read_unicodestring4(f):
raise ValueError("unicodestring4 byte count < 0: %d" % n)
data = f.read(n)
if len(data) == n:
- return unicode(data, 'utf-8')
+ return str(data, 'utf-8')
raise ValueError("expected %d bytes in a unicodestring4, but only %d "
"remain" % (n, len(data)))
@@ -750,7 +750,7 @@ pystring = StackObject(
pyunicode = StackObject(
name='unicode',
- obtype=unicode,
+ obtype=str,
doc="A Python Unicode string object.")
pynone = StackObject(