[Python-checkins] r62437 - python/branches/py3k/Doc/library/pickle.rst

mark.summerfield python-checkins at python.org
Mon Apr 21 16:47:45 CEST 2008


Author: mark.summerfield
Date: Mon Apr 21 16:47:45 2008
New Revision: 62437

Log:
dumps() and loads() work in terms of bytes objects not strings.



Modified:
   python/branches/py3k/Doc/library/pickle.rst

Modified: python/branches/py3k/Doc/library/pickle.rst
==============================================================================
--- python/branches/py3k/Doc/library/pickle.rst	(original)
+++ python/branches/py3k/Doc/library/pickle.rst	Mon Apr 21 16:47:45 2008
@@ -194,18 +194,18 @@
 
 .. function:: dumps(obj[, protocol])
 
-   Return the pickled representation of the object as a string, instead of writing
-   it to a file.
+   Return the pickled representation of the object as a :class:`bytes`
+   object, instead of writing it to a file.
 
    If the *protocol* parameter is omitted, protocol 3 is used.  If *protocol* 
    is specified as a negative value or :const:`HIGHEST_PROTOCOL`, the highest 
    protocol version will be used.
 
 
-.. function:: loads(string)
+.. function:: loads(bytes_object)
 
-   Read a pickled object hierarchy from a string.  Characters in the string past
-   the pickled object's representation are ignored.
+   Read a pickled object hierarchy from a :class:`bytes` object.
+   Bytes past the pickled object's representation are ignored.
 
 The :mod:`pickle` module also defines three exceptions:
 


More information about the Python-checkins mailing list