[Python-checkins] cpython (2.7): Fix method name in documentation (__setstate__ --> __getstate__)

eli.bendersky python-checkins at python.org
Wed Jan 2 15:02:28 CET 2013


http://hg.python.org/cpython/rev/08195c46f634
changeset:   81236:08195c46f634
branch:      2.7
parent:      81227:ee5123d6ab6c
user:        Eli Bendersky <eliben at gmail.com>
date:        Wed Jan 02 06:02:23 2013 -0800
summary:
  Fix method name in documentation (__setstate__ --> __getstate__)

files:
  Doc/library/pickle.rst |  9 +++++----
  1 files changed, 5 insertions(+), 4 deletions(-)


diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst
--- a/Doc/library/pickle.rst
+++ b/Doc/library/pickle.rst
@@ -352,8 +352,9 @@
 
 * 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 @@
 
 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. [#]_
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list