Author: christian.heimes
Date: Sat Nov  3 13:56:27 2007
New Revision: 58827

Modified:
   python/branches/py3k-pep3137/Lib/pickle.py
Log:
Fixed a bug in the pickle module found by Brett.
The round trip pickle.loads(pickle.dumps(b'bytes')) works again.

Modified: python/branches/py3k-pep3137/Lib/pickle.py
==============================================================================
--- python/branches/py3k-pep3137/Lib/pickle.py  (original)
+++ python/branches/py3k-pep3137/Lib/pickle.py  Sat Nov  3 13:56:27 2007
@@ -938,7 +938,7 @@
 
     def load_short_binstring(self):
         len = ord(self.read(1))
-        self.append(self.read(len))
+        self.append(bytes(self.read(len)))
     dispatch[SHORT_BINSTRING[0]] = load_short_binstring
 
     def load_tuple(self):
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to