mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
#2567: remove new-style/old-style class docs.
This commit is contained in:
parent
dc21db36cb
commit
23e8db57e7
6 changed files with 13 additions and 78 deletions
|
@ -26,11 +26,9 @@ instances.
|
|||
|
||||
.. function:: pickle(type, function[, constructor])
|
||||
|
||||
Declares that *function* should be used as a "reduction" function for objects of
|
||||
type *type*; *type* must not be a "classic" class object. (Classic classes are
|
||||
handled differently; see the documentation for the :mod:`pickle` module for
|
||||
details.) *function* should return either a string or a tuple containing two or
|
||||
three elements.
|
||||
Declares that *function* should be used as a "reduction" function for objects
|
||||
of type *type*. *function* should return either a string or a tuple
|
||||
containing two or three elements.
|
||||
|
||||
The optional *constructor* parameter, if provided, is a callable object which
|
||||
can be used to reconstruct the object when called with the tuple of arguments
|
||||
|
|
|
@ -403,6 +403,7 @@ Pickling and unpickling normal class instances
|
|||
single: __init__() (instance constructor)
|
||||
|
||||
.. XXX is __getinitargs__ only used with old-style classes?
|
||||
.. XXX update w.r.t Py3k's classes
|
||||
|
||||
When a pickled class instance is unpickled, its :meth:`__init__` method is
|
||||
normally *not* invoked. If it is desirable that the :meth:`__init__` method be
|
||||
|
@ -447,8 +448,8 @@ can do what they want. [#]_
|
|||
|
||||
.. warning::
|
||||
|
||||
For :term:`new-style class`\es, if :meth:`__getstate__` returns a false
|
||||
value, the :meth:`__setstate__` method will not be called.
|
||||
If :meth:`__getstate__` returns a false value, the :meth:`__setstate__`
|
||||
method will not be called.
|
||||
|
||||
|
||||
Pickling and unpickling extension types
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue