summaryrefslogtreecommitdiffstats
path: root/Doc/library/pickle.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-10-21 12:15:05 (GMT)
committerGeorg Brandl <georg@python.org>2007-10-21 12:15:05 (GMT)
commita7395038812b4c24f108c9f90b2b9db90c7f237e (patch)
tree87af05b836ab8f910dfc00c2c33c7e282e6cd28e /Doc/library/pickle.rst
parente7a0990113873e5f0cc5cac203f47a8dcbda9848 (diff)
downloadcpython-a7395038812b4c24f108c9f90b2b9db90c7f237e.zip
cpython-a7395038812b4c24f108c9f90b2b9db90c7f237e.tar.gz
cpython-a7395038812b4c24f108c9f90b2b9db90c7f237e.tar.bz2
Add :term:s for "new-style class".
Diffstat (limited to 'Doc/library/pickle.rst')
-rw-r--r--Doc/library/pickle.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst
index ab19ff8..e4471f2 100644
--- a/Doc/library/pickle.rst
+++ b/Doc/library/pickle.rst
@@ -122,7 +122,7 @@ There are currently 3 different protocols which can be used for pickling.
earlier versions of Python.
* Protocol version 2 was introduced in Python 2.3. It provides much more
- efficient pickling of new-style classes.
+ efficient pickling of :term:`new-style class`\es.
Refer to :pep:`307` for more information.
@@ -430,8 +430,8 @@ New-style types can provide a :meth:`__getnewargs__` method that is used for
protocol 2. Implementing this method is needed if the type establishes some
internal invariants when the instance is created, or if the memory allocation is
affected by the values passed to the :meth:`__new__` method for the type (as it
-is for tuples and strings). Instances of a new-style type :class:`C` are
-created using ::
+is for tuples and strings). Instances of a :term:`new-style class` :class:`C`
+are created using ::
obj = C.__new__(C, *args)
@@ -459,8 +459,8 @@ can do what they want. [#]_
.. warning::
- For new-style classes, if :meth:`__getstate__` returns a false value, the
- :meth:`__setstate__` method will not be called.
+ For :term:`new-style class`\es, if :meth:`__getstate__` returns a false
+ value, the :meth:`__setstate__` method will not be called.
Pickling and unpickling extension types