summaryrefslogtreecommitdiffstats
path: root/Doc/library/pickle.rst
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2013-01-02 13:54:36 (GMT)
committerEli Bendersky <eliben@gmail.com>2013-01-02 13:54:36 (GMT)
commita6d0dd5dc39557ecd9155a0b13fe843298563a2c (patch)
tree8ac27c13cd6437e06bc9e7c9338099736d8710cd /Doc/library/pickle.rst
parent75b936ec7fa6c2814aed7d857ad86c7d3c574947 (diff)
parent78f3ce577fda646812b31e5eddffff7f50ea40cd (diff)
downloadcpython-a6d0dd5dc39557ecd9155a0b13fe843298563a2c.zip
cpython-a6d0dd5dc39557ecd9155a0b13fe843298563a2c.tar.gz
cpython-a6d0dd5dc39557ecd9155a0b13fe843298563a2c.tar.bz2
Fix method name in documentation (__setstate__ --> __getstate__)
Diffstat (limited to 'Doc/library/pickle.rst')
-rw-r--r--Doc/library/pickle.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst
index 287a08b..168ef56 100644
--- a/Doc/library/pickle.rst
+++ b/Doc/library/pickle.rst
@@ -390,8 +390,9 @@ The following types can be pickled:
* classes that are defined at the top level of a module
-* instances of such classes whose :attr:`__dict__` or :meth:`__setstate__` is
- picklable (see section :ref:`pickle-inst` for details)
+* instances of such classes whose :attr:`__dict__` or the result of calling
+ :meth:`__getstate__` is picklable (see section :ref:`pickle-inst` for
+ details).
Attempts to pickle unpicklable objects will raise the :exc:`PicklingError`
exception; when this happens, an unspecified number of bytes may have already
@@ -402,8 +403,8 @@ raised in this case. You can carefully raise this limit with
Note that functions (built-in and user-defined) are pickled by "fully qualified"
name reference, not by value. This means that only the function name is
-pickled, along with the name of the module the function is defined in. Neither the
-function's code, nor any of its function attributes are pickled. Thus the
+pickled, along with the name of the module the function is defined in. Neither
+the function's code, nor any of its function attributes are pickled. Thus the
defining module must be importable in the unpickling environment, and the module
must contain the named object, otherwise an exception will be raised. [#]_