summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMark Summerfield <list@qtrac.plus.com>2008-04-21 14:47:45 (GMT)
committerMark Summerfield <list@qtrac.plus.com>2008-04-21 14:47:45 (GMT)
commitb9e2304c445b04b6199b663ae70315fc115f036f (patch)
treed4cc6caaa71e524f51d01d0062e0e9ea8ff8aba4 /Doc
parente57950fbfef77f327d79a73955b42e3696ecf9f0 (diff)
downloadcpython-b9e2304c445b04b6199b663ae70315fc115f036f.zip
cpython-b9e2304c445b04b6199b663ae70315fc115f036f.tar.gz
cpython-b9e2304c445b04b6199b663ae70315fc115f036f.tar.bz2
dumps() and loads() work in terms of bytes objects not strings.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/pickle.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst
index 6c7c1d0..848766f 100644
--- a/Doc/library/pickle.rst
+++ b/Doc/library/pickle.rst
@@ -194,18 +194,18 @@ process more convenient:
.. 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: