summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2013-01-02 14:02:23 (GMT)
committerEli Bendersky <eliben@gmail.com>2013-01-02 14:02:23 (GMT)
commitf29abd3254a1941f5bd4b892c1c9b814cabd5af1 (patch)
tree683d6c60343256c96370163d3f6dab0dd4b74f8e
parentdbaac37a5fc4cc221edc4d52c9b8986527b25761 (diff)
downloadcpython-f29abd3254a1941f5bd4b892c1c9b814cabd5af1.zip
cpython-f29abd3254a1941f5bd4b892c1c9b814cabd5af1.tar.gz
cpython-f29abd3254a1941f5bd4b892c1c9b814cabd5af1.tar.bz2
Fix method name in documentation (__setstate__ --> __getstate__)
-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 4d417d2..bea1099 100644
--- a/Doc/library/pickle.rst
+++ b/Doc/library/pickle.rst
@@ -352,8 +352,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-protocol` for details)
+* instances of such classes whose :attr:`__dict__` or the result of calling
+ :meth:`__getstate__` is picklable (see section :ref:`pickle-protocol` for
+ details).
Attempts to pickle unpicklable objects will raise the :exc:`PicklingError`
exception; when this happens, an unspecified number of bytes may have already
@@ -364,8 +365,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. [#]_