mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +00:00
Merged revisions 84142 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r84142 | georg.brandl | 2010-08-17 17:07:14 +0200 (Di, 17 Aug 2010) | 1 line Consistency check for versionadded/changed directives. ........
This commit is contained in:
parent
13f959b501
commit
23b4f927d5
18 changed files with 52 additions and 45 deletions
|
|
@ -320,13 +320,14 @@ Other objects
|
||||||
the conversion has failed. When the conversion fails, the *converter* function
|
the conversion has failed. When the conversion fails, the *converter* function
|
||||||
should raise an exception and leave the content of *address* unmodified.
|
should raise an exception and leave the content of *address* unmodified.
|
||||||
|
|
||||||
If the *converter* returns Py_CLEANUP_SUPPORTED, it may get called a second time
|
If the *converter* returns ``Py_CLEANUP_SUPPORTED``, it may get called a
|
||||||
if the argument parsing eventually fails, giving the converter a chance to release
|
second time if the argument parsing eventually fails, giving the converter a
|
||||||
any memory that it had already allocated. In this second call, the *object* parameter
|
chance to release any memory that it had already allocated. In this second
|
||||||
will be NULL; *address* will have the same value as in the original call.
|
call, the *object* parameter will be NULL; *address* will have the same value
|
||||||
|
as in the original call.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
.. versionchanged:: 3.1
|
||||||
Py_CLEANUP_SUPPORTED was added.
|
``Py_CLEANUP_SUPPORTED`` was added.
|
||||||
|
|
||||||
``(items)`` (:class:`tuple`) [*matching-items*]
|
``(items)`` (:class:`tuple`) [*matching-items*]
|
||||||
The object must be a Python sequence whose length is the number of format units
|
The object must be a Python sequence whose length is the number of format units
|
||||||
|
|
|
||||||
|
|
@ -165,6 +165,7 @@ All integers are implemented as "long" integer objects of arbitrary size.
|
||||||
cannot be represented as a :ctype:`long long`, an
|
cannot be represented as a :ctype:`long long`, an
|
||||||
:exc:`OverflowError` is raised and ``-1`` is returned.
|
:exc:`OverflowError` is raised and ``-1`` is returned.
|
||||||
|
|
||||||
|
|
||||||
.. cfunction:: unsigned PY_LONG_LONG PyLong_AsUnsignedLongLong(PyObject *pylong)
|
.. cfunction:: unsigned PY_LONG_LONG PyLong_AsUnsignedLongLong(PyObject *pylong)
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
|
|
@ -176,8 +177,8 @@ All integers are implemented as "long" integer objects of arbitrary size.
|
||||||
returned.
|
returned.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
.. versionchanged:: 3.1
|
||||||
A negative *pylong* now raises :exc:`OverflowError`, not
|
A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`.
|
||||||
:exc:`TypeError`.
|
|
||||||
|
|
||||||
.. cfunction:: unsigned long PyLong_AsUnsignedLongMask(PyObject *io)
|
.. cfunction:: unsigned long PyLong_AsUnsignedLongMask(PyObject *io)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -369,6 +369,7 @@ used, passsing :func:`PyUnicode_FSConverter` as the conversion function:
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
.. versionadded:: 3.1
|
||||||
|
|
||||||
|
|
||||||
.. cfunction:: PyObject* PyUnicode_DecodeFSDefaultAndSize(const char *s, Py_ssize_t size)
|
.. cfunction:: PyObject* PyUnicode_DecodeFSDefaultAndSize(const char *s, Py_ssize_t size)
|
||||||
|
|
||||||
Decode a null-terminated string using :cdata:`Py_FileSystemDefaultEncoding`
|
Decode a null-terminated string using :cdata:`Py_FileSystemDefaultEncoding`
|
||||||
|
|
|
||||||
|
|
@ -206,6 +206,6 @@ distribution::
|
||||||
:option:`-o` is a shortcut for :option:`--manifest-only`.
|
:option:`-o` is a shortcut for :option:`--manifest-only`.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
.. versionchanged:: 3.1
|
||||||
An existing generated :file:`MANIFEST` will be regenerated without
|
An existing generated :file:`MANIFEST` will be regenerated without
|
||||||
:command:`sdist` comparing its modification time to the one of
|
:command:`sdist` comparing its modification time to the one of
|
||||||
:file:`MANIFEST.in` or :file:`setup.py`.
|
:file:`MANIFEST.in` or :file:`setup.py`.
|
||||||
|
|
|
||||||
|
|
@ -552,7 +552,7 @@ they add the ability to access fields by name instead of position index.
|
||||||
lightweight and require no more memory than regular tuples.
|
lightweight and require no more memory than regular tuples.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
.. versionchanged:: 3.1
|
||||||
added support for *rename*.
|
Added support for *rename*.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
|
@ -843,7 +843,6 @@ attribute.
|
||||||
class.
|
class.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:class:`UserList` objects
|
:class:`UserList` objects
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,14 +38,14 @@ The :mod:`dis` module defines the following functions and constants:
|
||||||
|
|
||||||
.. function:: dis(x=None)
|
.. function:: dis(x=None)
|
||||||
|
|
||||||
Disassemble the *x* object. *x* can denote either a module, a
|
Disassemble the *x* object. *x* can denote either a module, a class, a
|
||||||
class, a method, a function, a code object, a string of source code or a
|
method, a function, a code object, a string of source code or a byte sequence
|
||||||
byte sequence of raw bytecode. For a module, it disassembles all
|
of raw bytecode. For a module, it disassembles all functions. For a class,
|
||||||
functions. For a class, it disassembles all methods. For a code object
|
it disassembles all methods. For a code object or sequence of raw bytecode,
|
||||||
or sequence of raw bytecode, it prints one line per bytecode instruction.
|
it prints one line per bytecode instruction. Strings are first compiled to
|
||||||
Strings are first compiled to code objects with the :func:`compile`
|
code objects with the :func:`compile` built-in function before being
|
||||||
built-in function before being disassembled. If no object is provided,
|
disassembled. If no object is provided, this function disassembles the last
|
||||||
this function disassembles the last traceback.
|
traceback.
|
||||||
|
|
||||||
|
|
||||||
.. function:: distb(tb=None)
|
.. function:: distb(tb=None)
|
||||||
|
|
|
||||||
|
|
@ -105,10 +105,9 @@ A hash object has the following methods:
|
||||||
equivalent to ``m.update(a+b)``.
|
equivalent to ``m.update(a+b)``.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
.. versionchanged:: 3.1
|
||||||
|
The Python GIL is released to allow other threads to run while hash
|
||||||
The Python GIL is released to allow other threads to run while
|
updates on data larger than 2048 bytes is taking place when using hash
|
||||||
hash updates on data larger than 2048 bytes is taking place when
|
algorithms supplied by OpenSSL.
|
||||||
using hash algorithms supplied by OpenSSL.
|
|
||||||
|
|
||||||
|
|
||||||
.. method:: hash.digest()
|
.. method:: hash.digest()
|
||||||
|
|
|
||||||
|
|
@ -299,7 +299,7 @@ I/O Base Classes
|
||||||
Return the new absolute position.
|
Return the new absolute position.
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
.. versionadded:: 3.1
|
||||||
The ``SEEK_*`` constants
|
The ``SEEK_*`` constants.
|
||||||
|
|
||||||
.. method:: seekable()
|
.. method:: seekable()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -207,6 +207,7 @@ loops that truncate the stream.
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
.. versionadded:: 3.1
|
||||||
|
|
||||||
|
|
||||||
.. function:: compress(data, selectors)
|
.. function:: compress(data, selectors)
|
||||||
|
|
||||||
Make an iterator that filters elements from *data* returning only those that
|
Make an iterator that filters elements from *data* returning only those that
|
||||||
|
|
@ -240,7 +241,7 @@ loops that truncate the stream.
|
||||||
for i in count())``.
|
for i in count())``.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
.. versionchanged:: 3.1
|
||||||
added *step* argument and allowed non-integer arguments.
|
Added *step* argument and allowed non-integer arguments.
|
||||||
|
|
||||||
.. function:: cycle(iterable)
|
.. function:: cycle(iterable)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -895,6 +895,7 @@ instantiated directly, but always through the module-level function
|
||||||
:const:`NOTSET` is found, and that value is returned.
|
:const:`NOTSET` is found, and that value is returned.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.. method:: Logger.debug(msg, *args, **kwargs)
|
.. method:: Logger.debug(msg, *args, **kwargs)
|
||||||
|
|
||||||
Logs a message with level :const:`DEBUG` on this logger. The *msg* is the
|
Logs a message with level :const:`DEBUG` on this logger. The *msg* is the
|
||||||
|
|
@ -2638,6 +2639,9 @@ methods of :class:`Logger`, i.e. :meth:`debug`, :meth:`info`, :meth:`warning`,
|
||||||
methods have the same signatures as their counterparts in :class:`Logger`, so
|
methods have the same signatures as their counterparts in :class:`Logger`, so
|
||||||
you can use the two types of instances interchangeably.
|
you can use the two types of instances interchangeably.
|
||||||
|
|
||||||
|
The :meth:`isEnabledFor` method was added to :class:`LoggerAdapter`. This
|
||||||
|
method delegates to the underlying logger.
|
||||||
|
|
||||||
|
|
||||||
Thread Safety
|
Thread Safety
|
||||||
-------------
|
-------------
|
||||||
|
|
|
||||||
|
|
@ -67,23 +67,22 @@ Notes on the availability of these functions:
|
||||||
File Names, Command Line Arguments, and Environment Variables
|
File Names, Command Line Arguments, and Environment Variables
|
||||||
-------------------------------------------------------------
|
-------------------------------------------------------------
|
||||||
|
|
||||||
In Python, file names, command line arguments, and environment
|
In Python, file names, command line arguments, and environment variables are
|
||||||
variables are represented using the string type. On some systems,
|
represented using the string type. On some systems, decoding these strings to
|
||||||
decoding these strings to and from bytes is necessary before passing
|
and from bytes is necessary before passing them to the operating system. Python
|
||||||
them to the operating system. Python uses the file system encoding to
|
uses the file system encoding to perform this conversion (see
|
||||||
perform this conversion (see :func:`sys.getfilesystemencoding`).
|
:func:`sys.getfilesystemencoding`).
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
.. versionchanged:: 3.1
|
||||||
On some systems, conversion using the file system encoding may
|
On some systems, conversion using the file system encoding may fail. In this
|
||||||
fail. In this case, Python uses the ``surrogateescape`` encoding
|
case, Python uses the ``surrogateescape`` encoding error handler, which means
|
||||||
error handler, which means that undecodable bytes are replaced by a
|
that undecodable bytes are replaced by a Unicode character U+DCxx on
|
||||||
Unicode character U+DCxx on decoding, and these are again
|
decoding, and these are again translated to the original byte on encoding.
|
||||||
translated to the original byte on encoding.
|
|
||||||
|
|
||||||
|
|
||||||
The file system encoding must guarantee to successfully decode all
|
The file system encoding must guarantee to successfully decode all bytes
|
||||||
bytes below 128. If the file system encoding fails to provide this
|
below 128. If the file system encoding fails to provide this guarantee, API
|
||||||
guarantee, API functions may raise UnicodeErrors.
|
functions may raise UnicodeErrors.
|
||||||
|
|
||||||
|
|
||||||
.. _os-procinfo:
|
.. _os-procinfo:
|
||||||
|
|
|
||||||
|
|
@ -67,9 +67,8 @@ The :mod:`runpy` module provides a single function:
|
||||||
It is recommended that the :mod:`sys` module be left alone when invoking this
|
It is recommended that the :mod:`sys` module be left alone when invoking this
|
||||||
function from threaded code.
|
function from threaded code.
|
||||||
|
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
.. versionchanged:: 3.1
|
||||||
Added ability to execute packages by looking for a ``__main__`` submodule
|
Added ability to execute packages by looking for a ``__main__`` submodule.
|
||||||
|
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
|
|
|
||||||
|
|
@ -234,7 +234,6 @@ Connection Objects
|
||||||
supplied, this must be a custom cursor class that extends
|
supplied, this must be a custom cursor class that extends
|
||||||
:class:`sqlite3.Cursor`.
|
:class:`sqlite3.Cursor`.
|
||||||
|
|
||||||
|
|
||||||
.. method:: Connection.commit()
|
.. method:: Connection.commit()
|
||||||
|
|
||||||
This method commits the current transaction. If you don't call this method,
|
This method commits the current transaction. If you don't call this method,
|
||||||
|
|
|
||||||
|
|
@ -829,6 +829,9 @@ functions based on regular expressions.
|
||||||
:func:`codecs.register_error`, see section :ref:`codec-base-classes`. For a
|
:func:`codecs.register_error`, see section :ref:`codec-base-classes`. For a
|
||||||
list of possible encodings, see section :ref:`standard-encodings`.
|
list of possible encodings, see section :ref:`standard-encodings`.
|
||||||
|
|
||||||
|
.. versionchanged:: 3.1
|
||||||
|
Support for keyword arguments added.
|
||||||
|
|
||||||
|
|
||||||
.. method:: str.endswith(suffix[, start[, end]])
|
.. method:: str.endswith(suffix[, start[, end]])
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -873,7 +873,7 @@ always available.
|
||||||
and so on.
|
and so on.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
.. versionchanged:: 3.1
|
||||||
Added named component attributes
|
Added named component attributes.
|
||||||
|
|
||||||
.. data:: warnoptions
|
.. data:: warnoptions
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -346,7 +346,7 @@ The :mod:`urllib.parse` module defines the following functions:
|
||||||
parameters are sent the :func:`quote_plus` for encoding.
|
parameters are sent the :func:`quote_plus` for encoding.
|
||||||
|
|
||||||
.. versionchanged:: 3.2
|
.. versionchanged:: 3.2
|
||||||
query paramater supports bytes and string.
|
Query parameter supports bytes and string objects.
|
||||||
|
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ The module defines the following items:
|
||||||
.. versionchanged:: 3.1
|
.. versionchanged:: 3.1
|
||||||
Support for file and file-like objects.
|
Support for file and file-like objects.
|
||||||
|
|
||||||
|
|
||||||
.. data:: ZIP_STORED
|
.. data:: ZIP_STORED
|
||||||
|
|
||||||
The numeric constant for an uncompressed archive member.
|
The numeric constant for an uncompressed archive member.
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ zipimporter Objects
|
||||||
was imported. Raise :exc:`ZipImportError` if the module couldn't be
|
was imported. Raise :exc:`ZipImportError` if the module couldn't be
|
||||||
found.
|
found.
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
.. versionadded:: 3.1
|
||||||
|
|
||||||
|
|
||||||
.. method:: get_source(fullname)
|
.. method:: get_source(fullname)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue