diff options
author | Georg Brandl <georg@python.org> | 2007-10-21 12:15:05 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-10-21 12:15:05 (GMT) |
commit | a7395038812b4c24f108c9f90b2b9db90c7f237e (patch) | |
tree | 87af05b836ab8f910dfc00c2c33c7e282e6cd28e /Doc/library | |
parent | e7a0990113873e5f0cc5cac203f47a8dcbda9848 (diff) | |
download | cpython-a7395038812b4c24f108c9f90b2b9db90c7f237e.zip cpython-a7395038812b4c24f108c9f90b2b9db90c7f237e.tar.gz cpython-a7395038812b4c24f108c9f90b2b9db90c7f237e.tar.bz2 |
Add :term:s for "new-style class".
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/ctypes.rst | 2 | ||||
-rw-r--r-- | Doc/library/functions.rst | 10 | ||||
-rw-r--r-- | Doc/library/logging.rst | 2 | ||||
-rw-r--r-- | Doc/library/pickle.rst | 10 | ||||
-rw-r--r-- | Doc/library/sqlite3.rst | 2 | ||||
-rw-r--r-- | Doc/library/xmlrpclib.rst | 5 |
6 files changed, 16 insertions, 15 deletions
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst index 4b749d1..2df733c 100644 --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -1950,7 +1950,7 @@ Data types in case the memory block contains pointers. Common methods of ctypes data types, these are all class methods (to be exact, -they are methods of the metaclass): +they are methods of the :term:`metaclass`): .. method:: _CData.from_address(address) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index f98adce..6c03472 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -350,7 +350,7 @@ available. They are listed here in alphabetical order. The *expression* argument is parsed and evaluated as a Python expression (technically speaking, a condition list) using the *globals* and *locals* - dictionaries as global and local name space. If the *globals* dictionary is + dictionaries as global and local namespace. If the *globals* dictionary is present and lacks '__builtins__', the current globals are copied into *globals* before *expression* is parsed. This means that *expression* normally has full access to the standard :mod:`__builtin__` module and restricted environments are @@ -808,8 +808,8 @@ available. They are listed here in alphabetical order. .. function:: property([fget[, fset[, fdel[, doc]]]]) - Return a property attribute for new-style classes (classes that derive from - :class:`object`). + Return a property attribute for :term:`new-style class`\es (classes that + derive from :class:`object`). *fget* is a function for getting an attribute value, likewise *fset* is a function for setting, and *fdel* a function for del'ing, an attribute. Typical @@ -1112,8 +1112,8 @@ available. They are listed here in alphabetical order. Return the superclass of *type*. If the second argument is omitted the super object returned is unbound. If the second argument is an object, ``isinstance(obj, type)`` must be true. If the second argument is a type, - ``issubclass(type2, type)`` must be true. :func:`super` only works for new-style - classes. + ``issubclass(type2, type)`` must be true. :func:`super` only works for + :term:`new-style class`\es. A typical use for calling a cooperative superclass method is:: diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 7e8703a..1dbb343 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -22,7 +22,7 @@ logging system for applications. Logging is performed by calling methods on instances of the :class:`Logger` class (hereafter called :dfn:`loggers`). Each instance has a name, and they are -conceptually arranged in a name space hierarchy using dots (periods) as +conceptually arranged in a namespace hierarchy using dots (periods) as separators. For example, a logger named "scan" is the parent of loggers "scan.text", "scan.html" and "scan.pdf". Logger names can be anything you want, and indicate the area of an application in which a logged message originates. 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 diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 029b8ba..b84de76 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -549,7 +549,7 @@ string representation and register the function with :meth:`register_adapter`. .. note:: - The type/class to adapt must be a new-style class, i. e. it must have + The type/class to adapt must be a :term:`new-style class`, i. e. it must have :class:`object` as one of its bases. .. literalinclude:: ../includes/sqlite3/adapter_point_2.py diff --git a/Doc/library/xmlrpclib.rst b/Doc/library/xmlrpclib.rst index b3efb5c..1faa891 100644 --- a/Doc/library/xmlrpclib.rst +++ b/Doc/library/xmlrpclib.rst @@ -113,8 +113,9 @@ between conformable Python objects and XML on the wire. The *use_datetime* flag was added. .. versionchanged:: 2.6 - Instances of new-style classes can be passed in if they have an *__dict__* - attribute and don't have a base class that is marshalled in a special way. + Instances of :term:`new-style class`\es can be passed in if they have an + *__dict__* attribute and don't have a base class that is marshalled in a + special way. .. seealso:: |