mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix all instances of bad reST generated by the converter.
Remove a debugging print.
This commit is contained in:
parent
a3e2e48326
commit
28e7172f36
@ -2,7 +2,6 @@ To do after conversion
|
||||
======================
|
||||
|
||||
* fix all references and links marked with `XXX`
|
||||
* adjust all literal include paths
|
||||
* fix all duplicate labels and undefined label references
|
||||
* split very large files and add toctrees
|
||||
* integrate standalone HOWTOs
|
||||
|
@ -1,9 +1,9 @@
|
||||
.. _reporting-bugs:
|
||||
|
||||
**************
|
||||
Reporting Bugs
|
||||
**************
|
||||
|
||||
.. _reporting-bugs:
|
||||
|
||||
Python is a mature programming language which has established a reputation for
|
||||
stability. In order to maintain this reputation, the developers would like to
|
||||
know of any deficiencies you find in Python or its documentation.
|
||||
|
@ -3047,8 +3047,8 @@ objects.
|
||||
.. cfunction:: PyObject* PyCObject_FromVoidPtrAndDesc(void* cobj, void* desc, void (*destr)(void *, void *))
|
||||
|
||||
Create a :ctype:`PyCObject` from the :ctype:`void \*` *cobj*. The *destr*
|
||||
function will be called when the object is reclaimed. The *desc* argument can be
|
||||
used to pass extra callback data for the destructor function.
|
||||
function will be called when the object is reclaimed. The *desc* argument can
|
||||
be used to pass extra callback data for the destructor function.
|
||||
|
||||
|
||||
.. cfunction:: void* PyCObject_AsVoidPtr(PyObject* self)
|
||||
|
@ -204,7 +204,7 @@ Initialization, Finalization, and Threads
|
||||
|
||||
.. cfunction:: char* Py_GetExecPrefix()
|
||||
|
||||
Return the *exec-prefix* for installed platform-*de*pendent files. This is
|
||||
Return the *exec-prefix* for installed platform-*dependent* files. This is
|
||||
derived through a number of complicated rules from the program name set with
|
||||
:cfunc:`Py_SetProgramName` and some environment variables; for example, if the
|
||||
program name is ``'/usr/local/bin/python'``, the exec-prefix is
|
||||
|
@ -619,9 +619,9 @@ variable(s) whose address should be passed.
|
||||
Convert a Python object to a C variable through a *converter* function. This
|
||||
takes two arguments: the first is a function, the second is the address of a C
|
||||
variable (of arbitrary type), converted to :ctype:`void \*`. The *converter*
|
||||
function in turn is called as follows:
|
||||
function in turn is called as follows::
|
||||
|
||||
*status*``=``*converter*``(``*object*, *address*``);``
|
||||
status = converter(object, address);
|
||||
|
||||
where *object* is the Python object to be converted and *address* is the
|
||||
:ctype:`void\*` argument that was passed to the :cfunc:`PyArg_Parse\*` function.
|
||||
|
@ -68,10 +68,10 @@ described here are distributed with the Python sources in the
|
||||
#. **Build the example DLL** --- In order to check that everything is set up
|
||||
right, try building:
|
||||
|
||||
#. Select a configuration. This step is optional. Choose :menuselection:`Build
|
||||
--> Configuration Manager --> Active Solution Configuration` and select either
|
||||
:guilabel:`Release` or\ :guilabel:`Debug`. If you skip this step, VC++ will
|
||||
use the Debug configuration by default.
|
||||
#. Select a configuration. This step is optional. Choose
|
||||
:menuselection:`Build --> Configuration Manager --> Active Solution Configuration`
|
||||
and select either :guilabel:`Release` or :guilabel:`Debug`. If you skip this
|
||||
step, VC++ will use the Debug configuration by default.
|
||||
|
||||
#. Build the DLL. Choose :menuselection:`Build --> Build Solution`. This
|
||||
creates all intermediate and result files in a subdirectory called either
|
||||
|
@ -1103,7 +1103,7 @@ the following methods:
|
||||
|
||||
Pretend *count* lines have been changed, starting with line *start*. If
|
||||
*changed* is supplied, it specifies whether the affected lines are marked as
|
||||
having been changed (*changed*=1) or unchanged (*changed*=0).
|
||||
having been changed (*changed*\ =1) or unchanged (*changed*\ =0).
|
||||
|
||||
|
||||
.. method:: window.touchwin()
|
||||
|
@ -1163,7 +1163,7 @@ Decimal FAQ
|
||||
Q. It is cumbersome to type ``decimal.Decimal('1234.5')``. Is there a way to
|
||||
minimize typing when using the interactive interpreter?
|
||||
|
||||
A. Some users abbreviate the constructor to just a single letter::
|
||||
\A. Some users abbreviate the constructor to just a single letter::
|
||||
|
||||
>>> D = decimal.Decimal
|
||||
>>> D('1.23') + D('3.45')
|
||||
|
@ -189,7 +189,7 @@ result back on the stack.
|
||||
|
||||
.. opcode:: UNARY_CONVERT ()
|
||||
|
||||
Implements ``TOS = `TOS``\ `.
|
||||
Implements ``TOS = `TOS```.
|
||||
|
||||
|
||||
.. opcode:: UNARY_INVERT ()
|
||||
|
@ -24,14 +24,13 @@ in this chapter is:
|
||||
linecache.rst
|
||||
shutil.rst
|
||||
dircache.rst
|
||||
Also see section :ref:`bltin-file-objects` for a description of Python's built-
|
||||
in file objects.
|
||||
|
||||
.. % XXX can this be included in the seealso environment? --amk
|
||||
|
||||
|
||||
.. seealso::
|
||||
|
||||
Section :ref:`bltin-file-objects`
|
||||
A description of Python's built-in file objects.
|
||||
|
||||
Module :mod:`os`
|
||||
Operating system interfaces, including functions to work with files at a lower
|
||||
level than the built-in file object.
|
||||
|
@ -90,7 +90,7 @@ The mathematical and bitwise operations are the most numerous:
|
||||
.. function:: add(a, b)
|
||||
__add__(a, b)
|
||||
|
||||
Return *a* ``+`` *b*, for *a* and *b* numbers.
|
||||
Return ``a + b``, for *a* and *b* numbers.
|
||||
|
||||
|
||||
.. function:: and_(a, b)
|
||||
@ -102,14 +102,14 @@ The mathematical and bitwise operations are the most numerous:
|
||||
.. function:: div(a, b)
|
||||
__div__(a, b)
|
||||
|
||||
Return *a* ``/`` *b* when ``__future__.division`` is not in effect. This is
|
||||
Return ``a / b`` when ``__future__.division`` is not in effect. This is
|
||||
also known as "classic" division.
|
||||
|
||||
|
||||
.. function:: floordiv(a, b)
|
||||
__floordiv__(a, b)
|
||||
|
||||
Return *a* ``//`` *b*.
|
||||
Return ``a // b``.
|
||||
|
||||
.. versionadded:: 2.2
|
||||
|
||||
@ -119,7 +119,7 @@ The mathematical and bitwise operations are the most numerous:
|
||||
__inv__(o)
|
||||
__invert__(o)
|
||||
|
||||
Return the bitwise inverse of the number *o*. This is equivalent to ``~``*o*.
|
||||
Return the bitwise inverse of the number *o*. This is equivalent to ``~o``.
|
||||
The names :func:`invert` and :func:`__invert__` were added in Python 2.0.
|
||||
|
||||
|
||||
@ -132,13 +132,13 @@ The mathematical and bitwise operations are the most numerous:
|
||||
.. function:: mod(a, b)
|
||||
__mod__(a, b)
|
||||
|
||||
Return *a* ``%`` *b*.
|
||||
Return ``a % b``.
|
||||
|
||||
|
||||
.. function:: mul(a, b)
|
||||
__mul__(a, b)
|
||||
|
||||
Return *a* ``*`` *b*, for *a* and *b* numbers.
|
||||
Return ``a * b``, for *a* and *b* numbers.
|
||||
|
||||
|
||||
.. function:: neg(o)
|
||||
@ -162,7 +162,7 @@ The mathematical and bitwise operations are the most numerous:
|
||||
.. function:: pow(a, b)
|
||||
__pow__(a, b)
|
||||
|
||||
Return *a* ``**`` *b*, for *a* and *b* numbers.
|
||||
Return ``a ** b``, for *a* and *b* numbers.
|
||||
|
||||
.. versionadded:: 2.3
|
||||
|
||||
@ -176,13 +176,13 @@ The mathematical and bitwise operations are the most numerous:
|
||||
.. function:: sub(a, b)
|
||||
__sub__(a, b)
|
||||
|
||||
Return *a* ``-`` *b*.
|
||||
Return ``a - b``.
|
||||
|
||||
|
||||
.. function:: truediv(a, b)
|
||||
__truediv__(a, b)
|
||||
|
||||
Return *a* ``/`` *b* when ``__future__.division`` is in effect. This is also
|
||||
Return ``a / b`` when ``__future__.division`` is in effect. This is also
|
||||
known as "true" division.
|
||||
|
||||
.. versionadded:: 2.2
|
||||
@ -197,7 +197,7 @@ The mathematical and bitwise operations are the most numerous:
|
||||
.. function:: index(a)
|
||||
__index__(a)
|
||||
|
||||
Return *a* converted to an integer. Equivalent to *a*``.__index__()``.
|
||||
Return *a* converted to an integer. Equivalent to ``a.__index__()``.
|
||||
|
||||
.. versionadded:: 2.5
|
||||
|
||||
@ -207,13 +207,13 @@ Operations which work with sequences include:
|
||||
.. function:: concat(a, b)
|
||||
__concat__(a, b)
|
||||
|
||||
Return *a* ``+`` *b* for *a* and *b* sequences.
|
||||
Return ``a + b`` for *a* and *b* sequences.
|
||||
|
||||
|
||||
.. function:: contains(a, b)
|
||||
__contains__(a, b)
|
||||
|
||||
Return the outcome of the test *b* ``in`` *a*. Note the reversed operands. The
|
||||
Return the outcome of the test ``b in a``. Note the reversed operands. The
|
||||
name :func:`__contains__` was added in Python 2.0.
|
||||
|
||||
|
||||
@ -231,7 +231,7 @@ Operations which work with sequences include:
|
||||
.. function:: delslice(a, b, c)
|
||||
__delslice__(a, b, c)
|
||||
|
||||
Delete the slice of *a* from index *b* to index *c*``-1``.
|
||||
Delete the slice of *a* from index *b* to index *c-1*.
|
||||
|
||||
|
||||
.. function:: getitem(a, b)
|
||||
@ -243,7 +243,7 @@ Operations which work with sequences include:
|
||||
.. function:: getslice(a, b, c)
|
||||
__getslice__(a, b, c)
|
||||
|
||||
Return the slice of *a* from index *b* to index *c*``-1``.
|
||||
Return the slice of *a* from index *b* to index *c-1*.
|
||||
|
||||
|
||||
.. function:: indexOf(a, b)
|
||||
@ -254,7 +254,7 @@ Operations which work with sequences include:
|
||||
.. function:: repeat(a, b)
|
||||
__repeat__(a, b)
|
||||
|
||||
Return *a* ``*`` *b* where *a* is a sequence and *b* is an integer.
|
||||
Return ``a * b`` where *a* is a sequence and *b* is an integer.
|
||||
|
||||
|
||||
.. function:: sequenceIncludes(...)
|
||||
@ -274,7 +274,7 @@ Operations which work with sequences include:
|
||||
.. function:: setslice(a, b, c, v)
|
||||
__setslice__(a, b, c, v)
|
||||
|
||||
Set the slice of *a* from index *b* to index *c*``-1`` to the sequence *v*.
|
||||
Set the slice of *a* from index *b* to index *c-1* to the sequence *v*.
|
||||
|
||||
Many operations have an "in-place" version. The following functions provide a
|
||||
more primitive access to in-place operators than the usual syntax does; for
|
||||
@ -405,16 +405,15 @@ to the compound statement ``z = x; z += y``.
|
||||
|
||||
.. versionadded:: 2.5
|
||||
|
||||
|
||||
The :mod:`operator` module also defines a few predicates to test the type of
|
||||
objects.
|
||||
|
||||
.. note::
|
||||
|
||||
Be careful not to misinterpret the results of these functions; only
|
||||
:func:`isCallable` has any measure of reliability with instance objects. For
|
||||
example:
|
||||
|
||||
::
|
||||
:func:`isCallable` has any measure of reliability with instance objects.
|
||||
For example::
|
||||
|
||||
>>> class C:
|
||||
... pass
|
||||
|
@ -766,10 +766,10 @@ func
|
||||
are commonly known as *callbacks*.)
|
||||
|
||||
add
|
||||
is optional, either ```` or``\ +``. Passing an empty string denotes that this
|
||||
binding is to replace any other bindings that this event is associated with.
|
||||
Preceeding with a``\ +`` means that this function is to be added to the list of
|
||||
functions bound to this event type.
|
||||
is optional, either ``''`` or ``'+'``. Passing an empty string denotes that
|
||||
this binding is to replace any other bindings that this event is associated
|
||||
with. Passing a ``'+'`` means that this function is to be added to the list
|
||||
of functions bound to this event type.
|
||||
|
||||
For example::
|
||||
|
||||
|
@ -62,10 +62,10 @@ The :mod:`urllib2` module defines the following functions:
|
||||
.. function:: build_opener([handler, ...])
|
||||
|
||||
Return an :class:`OpenerDirector` instance, which chains the handlers in the
|
||||
order given. *handler*s can be either instances of :class:`BaseHandler`, or
|
||||
order given. *handler*\s can be either instances of :class:`BaseHandler`, or
|
||||
subclasses of :class:`BaseHandler` (in which case it must be possible to call
|
||||
the constructor without any parameters). Instances of the following classes
|
||||
will be in front of the *handler*s, unless the *handler*s contain them,
|
||||
will be in front of the *handler*\s, unless the *handler*\s contain them,
|
||||
instances of them or subclasses of them: :class:`ProxyHandler`,
|
||||
:class:`UnknownHandler`, :class:`HTTPHandler`, :class:`HTTPDefaultErrorHandler`,
|
||||
:class:`HTTPRedirectHandler`, :class:`FTPHandler`, :class:`FileHandler`,
|
||||
|
@ -1,6 +1,5 @@
|
||||
|
||||
:mod:`xml.etree` --- The ElementTree API for XML
|
||||
=================================================
|
||||
================================================
|
||||
|
||||
.. module:: xml.etree
|
||||
:synopsis: Package containing common ElementTree modules.
|
||||
@ -23,4 +22,3 @@ this package contains the :mod:`ElementTree`, :mod:`ElementPath`, and
|
||||
`ElementTree Overview <http://effbot.org/tag/elementtree>`_
|
||||
The home page for :mod:`ElementTree`. This includes links to additional
|
||||
documentation, alternative implementations, and other add-ons.
|
||||
|
||||
|
@ -77,7 +77,7 @@ The :mod:`EasyDialogs` module defines the following functions:
|
||||
options are selected. Its items can take one of two forms: *optstr* or
|
||||
``(optstr, descr)``. When present, *descr* is a short descriptive string that
|
||||
is displayed in the dialog while this option is selected in the popup menu. The
|
||||
correspondence between *optstr*s and command-line arguments is:
|
||||
correspondence between *optstr*\s and command-line arguments is:
|
||||
|
||||
+----------------------+------------------------------------------+
|
||||
| *optstr* format | Command-line format |
|
||||
|
@ -86,12 +86,7 @@ following modules are relevant to MacPython AppleScript support:
|
||||
aepack.rst
|
||||
aetypes.rst
|
||||
miniae.rst
|
||||
|
||||
In addition, support modules have been pre-generated for :mod:`Finder`,
|
||||
:mod:`Terminal`, :mod:`Explorer`, :mod:`Netscape`, :mod:`CodeWarrior`,
|
||||
:mod:`SystemEvents` and :mod:`StdSuites`.
|
||||
|
||||
XXX: input{libgensuitemodule} :XXX
|
||||
XXX: input{libaetools} :XXX
|
||||
XXX: input{libaepack} :XXX
|
||||
XXX: input{libaetypes} :XXX
|
||||
XXX: input{libminiae} :XXX
|
||||
|
@ -2,7 +2,6 @@ To do after conversion
|
||||
======================
|
||||
|
||||
* fix all references and links marked with `XXX`
|
||||
* adjust all literal include paths
|
||||
* fix all duplicate labels and undefined label references
|
||||
* split very large files and add toctrees
|
||||
* integrate standalone HOWTOs
|
||||
|
@ -1,9 +1,9 @@
|
||||
.. _reporting-bugs:
|
||||
|
||||
**************
|
||||
Reporting Bugs
|
||||
**************
|
||||
|
||||
.. _reporting-bugs:
|
||||
|
||||
Python is a mature programming language which has established a reputation for
|
||||
stability. In order to maintain this reputation, the developers would like to
|
||||
know of any deficiencies you find in Python or its documentation.
|
||||
|
@ -3164,8 +3164,8 @@ objects.
|
||||
.. cfunction:: PyObject* PyCObject_FromVoidPtrAndDesc(void* cobj, void* desc, void (*destr)(void *, void *))
|
||||
|
||||
Create a :ctype:`PyCObject` from the :ctype:`void \*` *cobj*. The *destr*
|
||||
function will be called when the object is reclaimed. The *desc* argument can be
|
||||
used to pass extra callback data for the destructor function.
|
||||
function will be called when the object is reclaimed. The *desc* argument can
|
||||
be used to pass extra callback data for the destructor function.
|
||||
|
||||
|
||||
.. cfunction:: void* PyCObject_AsVoidPtr(PyObject* self)
|
||||
|
@ -204,7 +204,7 @@ Initialization, Finalization, and Threads
|
||||
|
||||
.. cfunction:: char* Py_GetExecPrefix()
|
||||
|
||||
Return the *exec-prefix* for installed platform-*de*pendent files. This is
|
||||
Return the *exec-prefix* for installed platform-*dependent* files. This is
|
||||
derived through a number of complicated rules from the program name set with
|
||||
:cfunc:`Py_SetProgramName` and some environment variables; for example, if the
|
||||
program name is ``'/usr/local/bin/python'``, the exec-prefix is
|
||||
|
@ -624,9 +624,9 @@ variable(s) whose address should be passed.
|
||||
Convert a Python object to a C variable through a *converter* function. This
|
||||
takes two arguments: the first is a function, the second is the address of a C
|
||||
variable (of arbitrary type), converted to :ctype:`void \*`. The *converter*
|
||||
function in turn is called as follows:
|
||||
function in turn is called as follows::
|
||||
|
||||
*status*``=``*converter*``(``*object*, *address*``);``
|
||||
status = converter(object, address);
|
||||
|
||||
where *object* is the Python object to be converted and *address* is the
|
||||
:ctype:`void\*` argument that was passed to the :cfunc:`PyArg_Parse\*` function.
|
||||
|
@ -68,10 +68,10 @@ described here are distributed with the Python sources in the
|
||||
#. **Build the example DLL** --- In order to check that everything is set up
|
||||
right, try building:
|
||||
|
||||
#. Select a configuration. This step is optional. Choose :menuselection:`Build
|
||||
--> Configuration Manager --> Active Solution Configuration` and select either
|
||||
:guilabel:`Release` or\ :guilabel:`Debug`. If you skip this step, VC++ will
|
||||
use the Debug configuration by default.
|
||||
#. Select a configuration. This step is optional. Choose
|
||||
:menuselection:`Build --> Configuration Manager --> Active Solution Configuration`
|
||||
and select either :guilabel:`Release` or :guilabel:`Debug`. If you skip this
|
||||
step, VC++ will use the Debug configuration by default.
|
||||
|
||||
#. Build the DLL. Choose :menuselection:`Build --> Build Solution`. This
|
||||
creates all intermediate and result files in a subdirectory called either
|
||||
|
@ -1103,7 +1103,7 @@ the following methods:
|
||||
|
||||
Pretend *count* lines have been changed, starting with line *start*. If
|
||||
*changed* is supplied, it specifies whether the affected lines are marked as
|
||||
having been changed (*changed*=1) or unchanged (*changed*=0).
|
||||
having been changed (*changed*\ =1) or unchanged (*changed*\ =0).
|
||||
|
||||
|
||||
.. method:: window.touchwin()
|
||||
|
@ -1163,7 +1163,7 @@ Decimal FAQ
|
||||
Q. It is cumbersome to type ``decimal.Decimal('1234.5')``. Is there a way to
|
||||
minimize typing when using the interactive interpreter?
|
||||
|
||||
A. Some users abbreviate the constructor to just a single letter::
|
||||
\A. Some users abbreviate the constructor to just a single letter::
|
||||
|
||||
>>> D = decimal.Decimal
|
||||
>>> D('1.23') + D('3.45')
|
||||
|
@ -24,14 +24,13 @@ in this chapter is:
|
||||
linecache.rst
|
||||
shutil.rst
|
||||
dircache.rst
|
||||
Also see section :ref:`bltin-file-objects` for a description of Python's built-
|
||||
in file objects.
|
||||
|
||||
.. % XXX can this be included in the seealso environment? --amk
|
||||
|
||||
|
||||
.. seealso::
|
||||
|
||||
Section :ref:`bltin-file-objects`
|
||||
A description of Python's built-in file objects.
|
||||
|
||||
Module :mod:`os`
|
||||
Operating system interfaces, including functions to work with files at a lower
|
||||
level than the built-in file object.
|
||||
|
@ -90,7 +90,7 @@ The mathematical and bitwise operations are the most numerous:
|
||||
.. function:: add(a, b)
|
||||
__add__(a, b)
|
||||
|
||||
Return *a* ``+`` *b*, for *a* and *b* numbers.
|
||||
Return ``a + b``, for *a* and *b* numbers.
|
||||
|
||||
|
||||
.. function:: and_(a, b)
|
||||
@ -102,14 +102,14 @@ The mathematical and bitwise operations are the most numerous:
|
||||
.. function:: div(a, b)
|
||||
__div__(a, b)
|
||||
|
||||
Return *a* ``/`` *b* when ``__future__.division`` is not in effect. This is
|
||||
Return ``a / b`` when ``__future__.division`` is not in effect. This is
|
||||
also known as "classic" division.
|
||||
|
||||
|
||||
.. function:: floordiv(a, b)
|
||||
__floordiv__(a, b)
|
||||
|
||||
Return *a* ``//`` *b*.
|
||||
Return ``a // b``.
|
||||
|
||||
.. versionadded:: 2.2
|
||||
|
||||
@ -119,7 +119,7 @@ The mathematical and bitwise operations are the most numerous:
|
||||
__inv__(o)
|
||||
__invert__(o)
|
||||
|
||||
Return the bitwise inverse of the number *o*. This is equivalent to ``~``*o*.
|
||||
Return the bitwise inverse of the number *o*. This is equivalent to ``~o``.
|
||||
The names :func:`invert` and :func:`__invert__` were added in Python 2.0.
|
||||
|
||||
|
||||
@ -132,13 +132,13 @@ The mathematical and bitwise operations are the most numerous:
|
||||
.. function:: mod(a, b)
|
||||
__mod__(a, b)
|
||||
|
||||
Return *a* ``%`` *b*.
|
||||
Return ``a % b``.
|
||||
|
||||
|
||||
.. function:: mul(a, b)
|
||||
__mul__(a, b)
|
||||
|
||||
Return *a* ``*`` *b*, for *a* and *b* numbers.
|
||||
Return ``a * b``, for *a* and *b* numbers.
|
||||
|
||||
|
||||
.. function:: neg(o)
|
||||
@ -162,7 +162,7 @@ The mathematical and bitwise operations are the most numerous:
|
||||
.. function:: pow(a, b)
|
||||
__pow__(a, b)
|
||||
|
||||
Return *a* ``**`` *b*, for *a* and *b* numbers.
|
||||
Return ``a ** b``, for *a* and *b* numbers.
|
||||
|
||||
.. versionadded:: 2.3
|
||||
|
||||
@ -176,13 +176,13 @@ The mathematical and bitwise operations are the most numerous:
|
||||
.. function:: sub(a, b)
|
||||
__sub__(a, b)
|
||||
|
||||
Return *a* ``-`` *b*.
|
||||
Return ``a - b``.
|
||||
|
||||
|
||||
.. function:: truediv(a, b)
|
||||
__truediv__(a, b)
|
||||
|
||||
Return *a* ``/`` *b* when ``__future__.division`` is in effect. This is also
|
||||
Return ``a / b`` when ``__future__.division`` is in effect. This is also
|
||||
known as "true" division.
|
||||
|
||||
.. versionadded:: 2.2
|
||||
@ -197,7 +197,7 @@ The mathematical and bitwise operations are the most numerous:
|
||||
.. function:: index(a)
|
||||
__index__(a)
|
||||
|
||||
Return *a* converted to an integer. Equivalent to *a*``.__index__()``.
|
||||
Return *a* converted to an integer. Equivalent to ``a.__index__()``.
|
||||
|
||||
.. versionadded:: 2.5
|
||||
|
||||
@ -207,13 +207,13 @@ Operations which work with sequences include:
|
||||
.. function:: concat(a, b)
|
||||
__concat__(a, b)
|
||||
|
||||
Return *a* ``+`` *b* for *a* and *b* sequences.
|
||||
Return ``a + b`` for *a* and *b* sequences.
|
||||
|
||||
|
||||
.. function:: contains(a, b)
|
||||
__contains__(a, b)
|
||||
|
||||
Return the outcome of the test *b* ``in`` *a*. Note the reversed operands. The
|
||||
Return the outcome of the test ``b in a``. Note the reversed operands. The
|
||||
name :func:`__contains__` was added in Python 2.0.
|
||||
|
||||
|
||||
@ -231,7 +231,7 @@ Operations which work with sequences include:
|
||||
.. function:: delslice(a, b, c)
|
||||
__delslice__(a, b, c)
|
||||
|
||||
Delete the slice of *a* from index *b* to index *c*``-1``.
|
||||
Delete the slice of *a* from index *b* to index *c-1*.
|
||||
|
||||
|
||||
.. function:: getitem(a, b)
|
||||
@ -243,7 +243,7 @@ Operations which work with sequences include:
|
||||
.. function:: getslice(a, b, c)
|
||||
__getslice__(a, b, c)
|
||||
|
||||
Return the slice of *a* from index *b* to index *c*``-1``.
|
||||
Return the slice of *a* from index *b* to index *c-1*.
|
||||
|
||||
|
||||
.. function:: indexOf(a, b)
|
||||
@ -254,7 +254,7 @@ Operations which work with sequences include:
|
||||
.. function:: repeat(a, b)
|
||||
__repeat__(a, b)
|
||||
|
||||
Return *a* ``*`` *b* where *a* is a sequence and *b* is an integer.
|
||||
Return ``a * b`` where *a* is a sequence and *b* is an integer.
|
||||
|
||||
|
||||
.. function:: sequenceIncludes(...)
|
||||
@ -274,7 +274,7 @@ Operations which work with sequences include:
|
||||
.. function:: setslice(a, b, c, v)
|
||||
__setslice__(a, b, c, v)
|
||||
|
||||
Set the slice of *a* from index *b* to index *c*``-1`` to the sequence *v*.
|
||||
Set the slice of *a* from index *b* to index *c-1* to the sequence *v*.
|
||||
|
||||
Many operations have an "in-place" version. The following functions provide a
|
||||
more primitive access to in-place operators than the usual syntax does; for
|
||||
@ -405,16 +405,15 @@ to the compound statement ``z = x; z += y``.
|
||||
|
||||
.. versionadded:: 2.5
|
||||
|
||||
|
||||
The :mod:`operator` module also defines a few predicates to test the type of
|
||||
objects.
|
||||
|
||||
.. note::
|
||||
|
||||
Be careful not to misinterpret the results of these functions; only
|
||||
:func:`isCallable` has any measure of reliability with instance objects. For
|
||||
example:
|
||||
|
||||
::
|
||||
:func:`isCallable` has any measure of reliability with instance objects.
|
||||
For example::
|
||||
|
||||
>>> class C:
|
||||
... pass
|
||||
|
@ -766,10 +766,10 @@ func
|
||||
are commonly known as *callbacks*.)
|
||||
|
||||
add
|
||||
is optional, either ```` or``\ +``. Passing an empty string denotes that this
|
||||
binding is to replace any other bindings that this event is associated with.
|
||||
Preceeding with a``\ +`` means that this function is to be added to the list of
|
||||
functions bound to this event type.
|
||||
is optional, either ``''`` or ``'+'``. Passing an empty string denotes that
|
||||
this binding is to replace any other bindings that this event is associated
|
||||
with. Passing a ``'+'`` means that this function is to be added to the list
|
||||
of functions bound to this event type.
|
||||
|
||||
For example::
|
||||
|
||||
|
@ -62,10 +62,10 @@ The :mod:`urllib2` module defines the following functions:
|
||||
.. function:: build_opener([handler, ...])
|
||||
|
||||
Return an :class:`OpenerDirector` instance, which chains the handlers in the
|
||||
order given. *handler*s can be either instances of :class:`BaseHandler`, or
|
||||
order given. *handler*\s can be either instances of :class:`BaseHandler`, or
|
||||
subclasses of :class:`BaseHandler` (in which case it must be possible to call
|
||||
the constructor without any parameters). Instances of the following classes
|
||||
will be in front of the *handler*s, unless the *handler*s contain them,
|
||||
will be in front of the *handler*\s, unless the *handler*\s contain them,
|
||||
instances of them or subclasses of them: :class:`ProxyHandler`,
|
||||
:class:`UnknownHandler`, :class:`HTTPHandler`, :class:`HTTPDefaultErrorHandler`,
|
||||
:class:`HTTPRedirectHandler`, :class:`FTPHandler`, :class:`FileHandler`,
|
||||
|
@ -1,6 +1,5 @@
|
||||
|
||||
:mod:`xml.etree` --- The ElementTree API for XML
|
||||
=================================================
|
||||
================================================
|
||||
|
||||
.. module:: xml.etree
|
||||
:synopsis: Package containing common ElementTree modules.
|
||||
|
@ -77,7 +77,7 @@ The :mod:`EasyDialogs` module defines the following functions:
|
||||
options are selected. Its items can take one of two forms: *optstr* or
|
||||
``(optstr, descr)``. When present, *descr* is a short descriptive string that
|
||||
is displayed in the dialog while this option is selected in the popup menu. The
|
||||
correspondence between *optstr*s and command-line arguments is:
|
||||
correspondence between *optstr*\s and command-line arguments is:
|
||||
|
||||
+----------------------+------------------------------------------+
|
||||
| *optstr* format | Command-line format |
|
||||
|
@ -86,12 +86,7 @@ following modules are relevant to MacPython AppleScript support:
|
||||
aepack.rst
|
||||
aetypes.rst
|
||||
miniae.rst
|
||||
|
||||
In addition, support modules have been pre-generated for :mod:`Finder`,
|
||||
:mod:`Terminal`, :mod:`Explorer`, :mod:`Netscape`, :mod:`CodeWarrior`,
|
||||
:mod:`SystemEvents` and :mod:`StdSuites`.
|
||||
|
||||
XXX: input{libgensuitemodule} :XXX
|
||||
XXX: input{libaetools} :XXX
|
||||
XXX: input{libaepack} :XXX
|
||||
XXX: input{libaetypes} :XXX
|
||||
XXX: input{libminiae} :XXX
|
||||
|
@ -416,7 +416,6 @@ def token_xrefs(text, env):
|
||||
pos = m.end()
|
||||
if pos < len(text):
|
||||
retnodes.append(nodes.Text(text[pos:], text[pos:]))
|
||||
print retnodes
|
||||
return retnodes
|
||||
|
||||
def productionlist_directive(name, arguments, options, content, lineno,
|
||||
|
Loading…
Reference in New Issue
Block a user