Commit 78f3ce57 authored by Eli Bendersky's avatar Eli Bendersky

Fix method name in documentation (__setstate__ --> __getstate__)

parent ba1edf2f
...@@ -367,8 +367,9 @@ The following types can be pickled: ...@@ -367,8 +367,9 @@ The following types can be pickled:
* classes that are defined at the top level of a module * classes that are defined at the top level of a module
* instances of such classes whose :attr:`__dict__` or :meth:`__setstate__` is * instances of such classes whose :attr:`__dict__` or the result of calling
picklable (see section :ref:`pickle-inst` for details) :meth:`__getstate__` is picklable (see section :ref:`pickle-inst` for
details).
Attempts to pickle unpicklable objects will raise the :exc:`PicklingError` Attempts to pickle unpicklable objects will raise the :exc:`PicklingError`
exception; when this happens, an unspecified number of bytes may have already exception; when this happens, an unspecified number of bytes may have already
...@@ -379,8 +380,8 @@ raised in this case. You can carefully raise this limit with ...@@ -379,8 +380,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" 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 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 pickled, along with the name of the module the function is defined in. Neither
function's code, nor any of its function attributes are pickled. Thus the 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 defining module must be importable in the unpickling environment, and the module
must contain the named object, otherwise an exception will be raised. [#]_ must contain the named object, otherwise an exception will be raised. [#]_
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment