mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Replace all previously inter-document links by :ref:s.
This commit is contained in:
@@ -112,8 +112,7 @@ The following data items and methods are also supported:
|
||||
effectively make use of this information), it makes more sense to use the buffer
|
||||
interface supported by array objects. This method is maintained for backward
|
||||
compatibility and should be avoided in new code. The buffer interface is
|
||||
documented in the Python/C API Reference Manual (XXX reference:
|
||||
../api/newTypes.html).
|
||||
documented in :ref:`bufferobjects`.
|
||||
|
||||
|
||||
.. method:: array.byteswap()
|
||||
|
||||
@@ -191,11 +191,7 @@ The module defines the following variables and functions:
|
||||
|
||||
.. function:: rms(fragment, width)
|
||||
|
||||
Return the root-mean-square of the fragment, i.e. ::
|
||||
|
||||
XXX: translate this math
|
||||
\catcode`_=8
|
||||
\sqrt{\frac{\sum{{S_{i}}^{2}}}{n}}
|
||||
Return the root-mean-square of the fragment, i.e. ``sqrt(sum(S_i^2)/n)``.
|
||||
|
||||
This is a measure of the power in an audio signal.
|
||||
|
||||
|
||||
@@ -1157,11 +1157,7 @@ the table.
|
||||
|
||||
.. module:: encodings.idna
|
||||
:synopsis: Internationalized Domain Names implementation
|
||||
|
||||
|
||||
.. % XXX The next line triggers a formatting bug, so it's commented out
|
||||
.. % until that can be fixed.
|
||||
.. % \moduleauthor{Martin v. L\"owis}
|
||||
.. moduleauthor:: Martin v. Löwis
|
||||
|
||||
.. versionadded:: 2.3
|
||||
|
||||
@@ -1220,13 +1216,10 @@ functions can be used directly if desired.
|
||||
:mod:`encodings.utf_8_sig` --- UTF-8 codec with BOM signature
|
||||
-------------------------------------------------------------
|
||||
|
||||
.. module:: encodings.utf-8-sig
|
||||
.. module:: encodings.utf_8_sig
|
||||
:synopsis: UTF-8 codec with BOM signature
|
||||
.. moduleauthor:: Walter Dörwald
|
||||
|
||||
|
||||
.. % XXX utf_8_sig gives TeX errors
|
||||
|
||||
.. versionadded:: 2.5
|
||||
|
||||
This module implements a variant of the UTF-8 codec: On encoding a UTF-8 encoded
|
||||
|
||||
@@ -13,23 +13,17 @@ additional modules into a Python installation. The new modules may be either
|
||||
100%-pure Python, or may be extension modules written in C, or may be
|
||||
collections of Python packages which include modules coded in both Python and C.
|
||||
|
||||
This package is discussed in two separate documents which are included in the
|
||||
Python documentation package. To learn about distributing new modules using the
|
||||
:mod:`distutils` facilities, read Distributing Python Modules (XXX reference:
|
||||
../dist/dist.html); this includes documentation needed to extend distutils. To
|
||||
learn about installing Python modules, whether or not the author made use of the
|
||||
:mod:`distutils` package, read Installing Python Modules (XXX reference:
|
||||
../inst/inst.html).
|
||||
This package is discussed in two separate chapters:
|
||||
|
||||
|
||||
.. seealso::
|
||||
|
||||
`Distributing Python Modules <../dist/dist.html>`_
|
||||
:ref:`distutils-index`
|
||||
The manual for developers and packagers of Python modules. This describes how
|
||||
to prepare :mod:`distutils`\ -based packages so that they may be easily
|
||||
installed into an existing Python installation.
|
||||
|
||||
`Installing Python Modules <../inst/inst.html>`_
|
||||
:ref:`install-index`
|
||||
An "administrators" manual which includes information on installing modules into
|
||||
an existing Python installation. You do not need to be a Python programmer to
|
||||
read this manual.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
.. _bltin-exceptions:
|
||||
|
||||
Built-in Exceptions
|
||||
===================
|
||||
@@ -40,8 +41,8 @@ prevent user code from raising an inappropriate error.
|
||||
The built-in exception classes can be sub-classed to define new exceptions;
|
||||
programmers are encouraged to at least derive new exceptions from the
|
||||
:exc:`Exception` class and not :exc:`BaseException`. More information on
|
||||
defining exceptions is available in the Python Tutorial (XXX reference:
|
||||
../tut/tut.html) under the heading "User-defined Exceptions."
|
||||
defining exceptions is available in the Python Tutorial under
|
||||
:ref:`tut-userexceptions`.
|
||||
|
||||
The following exceptions are only used as base classes for other exceptions.
|
||||
|
||||
|
||||
@@ -154,8 +154,7 @@ available. They are listed here in alphabetical order.
|
||||
def f(cls, arg1, arg2, ...): ...
|
||||
|
||||
The ``@classmethod`` form is a function decorator -- see the description of
|
||||
function definitions in chapter 7 of the Python Reference Manual (XXX reference:
|
||||
../ref/ref.html) for details.
|
||||
function definitions in :ref:`function` for details.
|
||||
|
||||
It can be called either on the class (such as ``C.f()``) or on an instance (such
|
||||
as ``C().f()``). The instance is ignored except for its class. If a class
|
||||
@@ -166,8 +165,7 @@ available. They are listed here in alphabetical order.
|
||||
see :func:`staticmethod` in this section.
|
||||
|
||||
For more information on class methods, consult the documentation on the standard
|
||||
type hierarchy in chapter 3 of the Python Reference Manual (XXX reference:
|
||||
../ref/types.html) (at the bottom).
|
||||
type hierarchy in :ref:`types`.
|
||||
|
||||
.. versionadded:: 2.2
|
||||
|
||||
@@ -995,8 +993,7 @@ available. They are listed here in alphabetical order.
|
||||
def f(arg1, arg2, ...): ...
|
||||
|
||||
The ``@staticmethod`` form is a function decorator -- see the description of
|
||||
function definitions in chapter 7 of the Python Reference Manual (XXX reference:
|
||||
../ref/function.html) for details.
|
||||
function definitions in :ref:`function` for details.
|
||||
|
||||
It can be called either on the class (such as ``C.f()``) or on an instance (such
|
||||
as ``C().f()``). The instance is ignored except for its class.
|
||||
@@ -1005,8 +1002,7 @@ available. They are listed here in alphabetical order.
|
||||
advanced concept, see :func:`classmethod` in this section.
|
||||
|
||||
For more information on static methods, consult the documentation on the
|
||||
standard type hierarchy in chapter 3 of the Python Reference Manual (XXX
|
||||
reference: ../ref/types.html) (at the bottom).
|
||||
standard type hierarchy in :ref:`types`.
|
||||
|
||||
.. versionadded:: 2.2
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ The tables in this chapter document the priorities of operators by listing them
|
||||
in order of ascending priority (within a table) and grouping operators that have
|
||||
the same priority in the same box. Binary operators of the same priority group
|
||||
from left to right. (Unary operators group from right to left, but there you
|
||||
have no real choice.) See chapter 5 of the Python Reference Manual (XXX
|
||||
reference: ../ref/ref.html) for the complete picture on operator priorities.
|
||||
have no real choice.) See :ref:`operator-summary` for the complete picture on
|
||||
operator priorities.
|
||||
|
||||
.. rubric:: Footnotes
|
||||
|
||||
|
||||
@@ -36,13 +36,12 @@ the rich comparison operators they support:
|
||||
__gt__(a, b)
|
||||
|
||||
Perform "rich comparisons" between *a* and *b*. Specifically, ``lt(a, b)`` is
|
||||
equivalent to ``a < b``, ``le(a, b)`` is equivalent to ``a <= b``, ``eq(a, b)``
|
||||
is equivalent to ``a == b``, ``ne(a, b)`` is equivalent to ``a != b``, ``gt(a,
|
||||
b)`` is equivalent to ``a > b`` and ``ge(a, b)`` is equivalent to ``a >= b``.
|
||||
Note that unlike the built-in :func:`cmp`, these functions can return any value,
|
||||
which may or may not be interpretable as a Boolean value. See the Python
|
||||
Reference Manual (XXX reference: ../ref/ref.html) for more information about
|
||||
rich comparisons.
|
||||
equivalent to ``a < b``, ``le(a, b)`` is equivalent to ``a <= b``, ``eq(a,
|
||||
b)`` is equivalent to ``a == b``, ``ne(a, b)`` is equivalent to ``a != b``,
|
||||
``gt(a, b)`` is equivalent to ``a > b`` and ``ge(a, b)`` is equivalent to ``a
|
||||
>= b``. Note that unlike the built-in :func:`cmp`, these functions can
|
||||
return any value, which may or may not be interpretable as a Boolean value.
|
||||
See :ref:`comparisons` for more information about rich comparisons.
|
||||
|
||||
.. versionadded:: 2.2
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ presented.
|
||||
|
||||
Most importantly, a good understanding of the Python grammar processed by the
|
||||
internal parser is required. For full information on the language syntax, refer
|
||||
to the Python Language Reference (XXX reference: ../ref/ref.html). The parser
|
||||
to :ref:`reference-index`. The parser
|
||||
itself is created from a grammar specification defined in the file
|
||||
:file:`Grammar/Grammar` in the standard Python distribution. The parse trees
|
||||
stored in the AST objects created by this module are the actual output from the
|
||||
|
||||
@@ -405,6 +405,5 @@ The events have the following meaning:
|
||||
Note that as an exception is propagated down the chain of callers, an
|
||||
``'exception'`` event is generated at each level.
|
||||
|
||||
For more information on code and frame objects, refer to the Python Reference
|
||||
Manual (XXX reference: ../ref/ref.html).
|
||||
For more information on code and frame objects, refer to :ref:`types`.
|
||||
|
||||
|
||||
@@ -26,10 +26,7 @@ Some operations are supported by several object types; in particular,
|
||||
practically all objects can be compared, tested for truth value, and converted
|
||||
to a string (with the :func:`repr` function or the slightly different
|
||||
:func:`str` function). The latter function is implicitly used when an object is
|
||||
written by the :keyword:`print` statement. (Information on the :keyword:`print`
|
||||
statement (XXX reference: ../ref/print.html) and other language statements can
|
||||
be found in the Python Reference Manual (XXX reference: ../ref/ref.html) and the
|
||||
Python Tutorial (XXX reference: ../tut/tut.html).)
|
||||
written by the :func:`print` function.
|
||||
|
||||
|
||||
.. _truth:
|
||||
@@ -178,10 +175,9 @@ a complex number.
|
||||
|
||||
.. index:: single: __cmp__() (instance method)
|
||||
|
||||
Instances of a class normally compare as non-equal unless the class defines the
|
||||
:meth:`__cmp__` method. Refer to the Python Reference Manual (XXX reference:
|
||||
../ref/customization.html) for information on the use of this method to effect
|
||||
object comparisons.
|
||||
Instances of a class normally compare as non-equal unless the class defines the
|
||||
:meth:`__cmp__` method. Refer to :ref:`customization`) for information on the
|
||||
use of this method to effect object comparisons.
|
||||
|
||||
**Implementation note:** Objects of different types except numbers are ordered
|
||||
by their type names; objects of the same types that don't support proper
|
||||
@@ -490,12 +486,11 @@ and range objects.
|
||||
object: list
|
||||
|
||||
String literals are written in single or double quotes: ``'xyzzy'``,
|
||||
``"frobozz"``. See chapter 2 of the Python Reference Manual (XXX reference:
|
||||
../ref/strings.html) for more about string literals. Unicode strings are much
|
||||
like strings, but are specified in the syntax using a preceding ``'u'``
|
||||
character: ``u'abc'``, ``u"def"``. Lists are constructed with square brackets,
|
||||
separating items with commas: ``[a, b, c]``. Tuples are constructed by the
|
||||
comma operator (not within square brackets), with or without enclosing
|
||||
``"frobozz"``. See :ref:`strings` for more about string literals. Unicode
|
||||
strings are much like strings, but are specified in the syntax using a preceding
|
||||
``'u'`` character: ``u'abc'``, ``u"def"``. Lists are constructed with square
|
||||
brackets, separating items with commas: ``[a, b, c]``. Tuples are constructed
|
||||
by the comma operator (not within square brackets), with or without enclosing
|
||||
parentheses, but an empty tuple must have the enclosing parentheses, such as
|
||||
``a, b, c`` or ``()``. A single item tuple must have a trailing comma, such as
|
||||
``(d,)``.
|
||||
@@ -2106,8 +2101,7 @@ Classes and Class Instances
|
||||
|
||||
.. _classes and instances:
|
||||
|
||||
See chapters 3 and 7 of the Python Reference Manual (XXX reference:
|
||||
../ref/ref.html) for these.
|
||||
See :ref:`objects` and :ref:`class` for these.
|
||||
|
||||
|
||||
.. _typesfunctions:
|
||||
@@ -2122,8 +2116,7 @@ There are really two flavors of function objects: built-in functions and user-
|
||||
defined functions. Both support the same operation (to call the function), but
|
||||
the implementation is different, hence the different object types.
|
||||
|
||||
See the Python Reference Manual (XXX reference: ../ref/ref.html) for more
|
||||
information.
|
||||
See :ref:`function` for more information.
|
||||
|
||||
|
||||
.. _typesmethods:
|
||||
@@ -2165,8 +2158,7 @@ explicitly set it on the underlying function object::
|
||||
c = C()
|
||||
c.method.im_func.whoami = 'my name is c'
|
||||
|
||||
See the Python Reference Manual (XXX reference: ../ref/ref.html) for more
|
||||
information.
|
||||
See :ref:`types` for more information.
|
||||
|
||||
|
||||
.. _bltin-code-objects:
|
||||
@@ -2194,8 +2186,7 @@ attribute.
|
||||
A code object can be executed or evaluated by passing it (instead of a source
|
||||
string) to the :func:`exec` or :func:`eval` built-in functions.
|
||||
|
||||
See the Python Reference Manual (XXX reference: ../ref/ref.html) for more
|
||||
information.
|
||||
See :ref:`types` for more information.
|
||||
|
||||
|
||||
.. _bltin-type-objects:
|
||||
@@ -2232,9 +2223,9 @@ It is written as ``None``.
|
||||
The Ellipsis Object
|
||||
-------------------
|
||||
|
||||
This object is mostly used by extended slice notation (see the Python Reference
|
||||
Manual (XXX reference: ../ref/ref.html)). It supports no special operations.
|
||||
There is exactly one ellipsis object, named :const:`Ellipsis` (a built-in name).
|
||||
This object is mostly used by extended slice notation (see :ref:`slicings`). It
|
||||
supports no special operations. There is exactly one ellipsis object, named
|
||||
:const:`Ellipsis` (a built-in name).
|
||||
|
||||
It is written as ``Ellipsis`` or ``...``.
|
||||
|
||||
@@ -2263,9 +2254,8 @@ They are written as ``False`` and ``True``, respectively.
|
||||
Internal Objects
|
||||
----------------
|
||||
|
||||
See the Python Reference Manual (XXX reference: ../ref/ref.html) for this
|
||||
information. It describes stack frame objects, traceback objects, and slice
|
||||
objects.
|
||||
See :ref:`types` for this information. It describes stack frame objects,
|
||||
traceback objects, and slice objects.
|
||||
|
||||
|
||||
.. _specialattrs:
|
||||
@@ -2315,8 +2305,8 @@ types, where they are relevant. Some of these are not reported by the
|
||||
|
||||
.. rubric:: Footnotes
|
||||
|
||||
.. [#] Additional information on these special methods may be found in the Python
|
||||
Reference Manual (XXX reference: ../ref/ref.html).
|
||||
.. [#] Additional information on these special methods may be found in the Python
|
||||
Reference Manual (:ref:`customization`).
|
||||
|
||||
.. [#] As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, and
|
||||
similarly for tuples.
|
||||
|
||||
@@ -16,8 +16,8 @@ warrant raising an exception and terminating the program. For example, one
|
||||
might want to issue a warning when a program uses an obsolete module.
|
||||
|
||||
Python programmers issue warnings by calling the :func:`warn` function defined
|
||||
in this module. (C programmers use :cfunc:`PyErr_Warn`; see the Python/C API
|
||||
Reference Manual (XXX reference: ../api/exceptionHandling.html) for details).
|
||||
in this module. (C programmers use :cfunc:`PyErr_Warn`; see
|
||||
:ref:`exceptionhandling` for details).
|
||||
|
||||
Warning messages are normally written to ``sys.stderr``, but their disposition
|
||||
can be changed flexibly, from ignoring all warnings to turning them into
|
||||
|
||||
@@ -65,14 +65,8 @@ support weak references but can add support through subclassing::
|
||||
|
||||
obj = Dict(red=1, green=2, blue=3) # this object is weak referencable
|
||||
|
||||
Extension types can easily be made to support weak references; see "Weak
|
||||
Reference Support (XXX reference: ../ext/weakref-support.html)" in Extending and
|
||||
Embedding the Python Interpreter (XXX reference: ../ext/ext.html).
|
||||
|
||||
.. % The referenced section used to appear in this document with the
|
||||
.. % \label weakref-extension. It would be good to be able to generate a
|
||||
.. % redirect for the corresponding HTML page (weakref-extension.html)
|
||||
.. % for on-line versions of this document.
|
||||
Extension types can easily be made to support weak references; see
|
||||
:ref:`weakref-support`.
|
||||
|
||||
|
||||
.. class:: ref(object[, callback])
|
||||
|
||||
@@ -151,9 +151,7 @@ Notes:
|
||||
Only on Windows platforms.
|
||||
|
||||
(3)
|
||||
Only on MacOS platforms; requires the standard MacPython :mod:`ic` module,
|
||||
described in the Macintosh Library Modules (XXX reference: ../mac/module-
|
||||
ic.html) manual.
|
||||
Only on MacOS platforms; requires the standard MacPython :mod:`ic` module.
|
||||
|
||||
(4)
|
||||
Only on MacOS X platform.
|
||||
|
||||
@@ -267,7 +267,7 @@ The following methods work on the element's children (subelements).
|
||||
|
||||
.. method:: Element.remove(subelement)
|
||||
|
||||
Removes *subelement* from the element. Unlike the findXXX methods this method
|
||||
Removes *subelement* from the element. Unlike the findXYZ methods this method
|
||||
compares elements based on the instance identity, not on tag value or contents.
|
||||
|
||||
Element objects also support the following sequence type methods for working
|
||||
|
||||
@@ -207,7 +207,7 @@ events in the input document:
|
||||
information to the application to expand prefixes in those contexts itself, if
|
||||
necessary.
|
||||
|
||||
.. % % XXX This is not really the default, is it? MvL
|
||||
.. % XXX This is not really the default, is it? MvL
|
||||
|
||||
Note that :meth:`startPrefixMapping` and :meth:`endPrefixMapping` events are not
|
||||
guaranteed to be properly nested relative to each-other: all
|
||||
@@ -232,7 +232,7 @@ events in the input document:
|
||||
|
||||
The *name* parameter contains the raw XML 1.0 name of the element type as a
|
||||
string and the *attrs* parameter holds an object of the :class:`Attributes`
|
||||
interface (XXX reference: attributes-objects.html) containing the attributes of
|
||||
interface (see :ref:`attributes-objects`) containing the attributes of
|
||||
the element. The object passed as *attrs* may be re-used by the parser; holding
|
||||
on to a reference to it is not a reliable way to keep a copy of the attributes.
|
||||
To keep a copy of the attributes, use the :meth:`copy` method of the *attrs*
|
||||
@@ -254,7 +254,7 @@ events in the input document:
|
||||
The *name* parameter contains the name of the element type as a ``(uri,
|
||||
localname)`` tuple, the *qname* parameter contains the raw XML 1.0 name used in
|
||||
the source document, and the *attrs* parameter holds an instance of the
|
||||
:class:`AttributesNS` interface (XXX reference: attributes-ns-objects.html)
|
||||
:class:`AttributesNS` interface (see :ref:`attributes-ns-objects`)
|
||||
containing the attributes of the element. If no namespace is associated with
|
||||
the element, the *uri* component of *name* will be ``None``. The object passed
|
||||
as *attrs* may be re-used by the parser; holding on to a reference to it is not
|
||||
|
||||
Reference in New Issue
Block a user