2007-08-15 11:28:01 -03:00
|
|
|
.. highlightlang:: rest
|
|
|
|
|
|
|
|
Additional Markup Constructs
|
|
|
|
============================
|
|
|
|
|
|
|
|
Sphinx adds a lot of new directives and interpreted text roles to standard reST
|
|
|
|
markup. This section contains the reference material for these facilities.
|
|
|
|
Documentation for "standard" reST constructs is not included here, though
|
|
|
|
they are used in the Python documentation.
|
|
|
|
|
Merged revisions 67154,67157-67159,67162-67163,67166,67175-67176,67189,67224-67225,67243 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r67154 | hirokazu.yamamoto | 2008-11-08 04:46:17 +0100 (Sat, 08 Nov 2008) | 1 line
Issue #4071: ntpath.abspath returned an empty string for long unicode path.
........
r67157 | georg.brandl | 2008-11-08 12:47:44 +0100 (Sat, 08 Nov 2008) | 2 lines
Don't use "HOWTO" as the title for all howto .tex files.
........
r67158 | georg.brandl | 2008-11-08 12:48:20 +0100 (Sat, 08 Nov 2008) | 2 lines
Update "Documenting" a bit. Concentrate on Python-specifics.
........
r67159 | georg.brandl | 2008-11-08 13:52:25 +0100 (Sat, 08 Nov 2008) | 2 lines
Fix warning.
........
r67162 | benjamin.peterson | 2008-11-08 17:55:33 +0100 (Sat, 08 Nov 2008) | 1 line
a few compile() and ast doc improvements
........
r67163 | benjamin.peterson | 2008-11-08 18:04:18 +0100 (Sat, 08 Nov 2008) | 1 line
move context clue to versionchanged tag
........
r67166 | benjamin.peterson | 2008-11-08 18:07:06 +0100 (Sat, 08 Nov 2008) | 1 line
clarify what was added
........
r67175 | benjamin.peterson | 2008-11-09 02:44:32 +0100 (Sun, 09 Nov 2008) | 1 line
update link
........
r67176 | benjamin.peterson | 2008-11-09 02:52:32 +0100 (Sun, 09 Nov 2008) | 1 line
fix comment
........
r67189 | benjamin.peterson | 2008-11-11 22:56:06 +0100 (Tue, 11 Nov 2008) | 1 line
use correct name
........
r67224 | georg.brandl | 2008-11-15 09:10:04 +0100 (Sat, 15 Nov 2008) | 2 lines
#4324: fix getlocale() argument.
........
r67225 | brett.cannon | 2008-11-15 23:33:25 +0100 (Sat, 15 Nov 2008) | 1 line
Clarify the docs for the 'strict' argument to httplib.HTTPConnection.
........
r67243 | benjamin.peterson | 2008-11-17 22:39:05 +0100 (Mon, 17 Nov 2008) | 1 line
a few fixes on the download page
........
2008-12-05 04:35:09 -04:00
|
|
|
.. note::
|
2007-08-15 11:28:01 -03:00
|
|
|
|
Merged revisions 67154,67157-67159,67162-67163,67166,67175-67176,67189,67224-67225,67243 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r67154 | hirokazu.yamamoto | 2008-11-08 04:46:17 +0100 (Sat, 08 Nov 2008) | 1 line
Issue #4071: ntpath.abspath returned an empty string for long unicode path.
........
r67157 | georg.brandl | 2008-11-08 12:47:44 +0100 (Sat, 08 Nov 2008) | 2 lines
Don't use "HOWTO" as the title for all howto .tex files.
........
r67158 | georg.brandl | 2008-11-08 12:48:20 +0100 (Sat, 08 Nov 2008) | 2 lines
Update "Documenting" a bit. Concentrate on Python-specifics.
........
r67159 | georg.brandl | 2008-11-08 13:52:25 +0100 (Sat, 08 Nov 2008) | 2 lines
Fix warning.
........
r67162 | benjamin.peterson | 2008-11-08 17:55:33 +0100 (Sat, 08 Nov 2008) | 1 line
a few compile() and ast doc improvements
........
r67163 | benjamin.peterson | 2008-11-08 18:04:18 +0100 (Sat, 08 Nov 2008) | 1 line
move context clue to versionchanged tag
........
r67166 | benjamin.peterson | 2008-11-08 18:07:06 +0100 (Sat, 08 Nov 2008) | 1 line
clarify what was added
........
r67175 | benjamin.peterson | 2008-11-09 02:44:32 +0100 (Sun, 09 Nov 2008) | 1 line
update link
........
r67176 | benjamin.peterson | 2008-11-09 02:52:32 +0100 (Sun, 09 Nov 2008) | 1 line
fix comment
........
r67189 | benjamin.peterson | 2008-11-11 22:56:06 +0100 (Tue, 11 Nov 2008) | 1 line
use correct name
........
r67224 | georg.brandl | 2008-11-15 09:10:04 +0100 (Sat, 15 Nov 2008) | 2 lines
#4324: fix getlocale() argument.
........
r67225 | brett.cannon | 2008-11-15 23:33:25 +0100 (Sat, 15 Nov 2008) | 1 line
Clarify the docs for the 'strict' argument to httplib.HTTPConnection.
........
r67243 | benjamin.peterson | 2008-11-17 22:39:05 +0100 (Mon, 17 Nov 2008) | 1 line
a few fixes on the download page
........
2008-12-05 04:35:09 -04:00
|
|
|
This is just an overview of Sphinx' extended markup capabilities; full
|
|
|
|
coverage can be found in `its own documentation
|
|
|
|
<http://sphinx.pocoo.org/contents.html>`_.
|
2007-08-15 11:28:01 -03:00
|
|
|
|
|
|
|
|
|
|
|
Meta-information markup
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
.. describe:: sectionauthor
|
|
|
|
|
|
|
|
Identifies the author of the current section. The argument should include
|
|
|
|
the author's name such that it can be used for presentation (though it isn't)
|
|
|
|
and email address. The domain name portion of the address should be lower
|
|
|
|
case. Example::
|
|
|
|
|
|
|
|
.. sectionauthor:: Guido van Rossum <guido@python.org>
|
|
|
|
|
|
|
|
Currently, this markup isn't reflected in the output in any way, but it helps
|
|
|
|
keep track of contributions.
|
|
|
|
|
|
|
|
|
|
|
|
Module-specific markup
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
The markup described in this section is used to provide information about a
|
|
|
|
module being documented. Each module should be documented in its own file.
|
|
|
|
Normally this markup appears after the title heading of that file; a typical
|
|
|
|
file might start like this::
|
|
|
|
|
|
|
|
:mod:`parrot` -- Dead parrot access
|
|
|
|
===================================
|
|
|
|
|
|
|
|
.. module:: parrot
|
|
|
|
:platform: Unix, Windows
|
|
|
|
:synopsis: Analyze and reanimate dead parrots.
|
|
|
|
.. moduleauthor:: Eric Cleese <eric@python.invalid>
|
|
|
|
.. moduleauthor:: John Idle <john@python.invalid>
|
|
|
|
|
|
|
|
As you can see, the module-specific markup consists of two directives, the
|
|
|
|
``module`` directive and the ``moduleauthor`` directive.
|
|
|
|
|
|
|
|
.. describe:: module
|
|
|
|
|
|
|
|
This directive marks the beginning of the description of a module (or package
|
|
|
|
submodule, in which case the name should be fully qualified, including the
|
|
|
|
package name).
|
|
|
|
|
|
|
|
The ``platform`` option, if present, is a comma-separated list of the
|
|
|
|
platforms on which the module is available (if it is available on all
|
|
|
|
platforms, the option should be omitted). The keys are short identifiers;
|
|
|
|
examples that are in use include "IRIX", "Mac", "Windows", and "Unix". It is
|
|
|
|
important to use a key which has already been used when applicable.
|
|
|
|
|
|
|
|
The ``synopsis`` option should consist of one sentence describing the
|
|
|
|
module's purpose -- it is currently only used in the Global Module Index.
|
|
|
|
|
2007-08-15 15:41:25 -03:00
|
|
|
The ``deprecated`` option can be given (with no value) to mark a module as
|
|
|
|
deprecated; it will be designated as such in various locations then.
|
|
|
|
|
2007-08-15 11:28:01 -03:00
|
|
|
.. describe:: moduleauthor
|
|
|
|
|
|
|
|
The ``moduleauthor`` directive, which can appear multiple times, names the
|
|
|
|
authors of the module code, just like ``sectionauthor`` names the author(s)
|
|
|
|
of a piece of documentation. It too does not result in any output currently.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
It is important to make the section title of a module-describing file
|
|
|
|
meaningful since that value will be inserted in the table-of-contents trees
|
|
|
|
in overview files.
|
|
|
|
|
|
|
|
|
|
|
|
Information units
|
|
|
|
-----------------
|
|
|
|
|
|
|
|
There are a number of directives used to describe specific features provided by
|
|
|
|
modules. Each directive requires one or more signatures to provide basic
|
|
|
|
information about what is being described, and the content should be the
|
|
|
|
description. The basic version makes entries in the general index; if no index
|
|
|
|
entry is desired, you can give the directive option flag ``:noindex:``. The
|
|
|
|
following example shows all of the features of this directive type::
|
|
|
|
|
|
|
|
.. function:: spam(eggs)
|
|
|
|
ham(eggs)
|
|
|
|
:noindex:
|
|
|
|
|
|
|
|
Spam or ham the foo.
|
|
|
|
|
|
|
|
The signatures of object methods or data attributes should always include the
|
|
|
|
type name (``.. method:: FileInput.input(...)``), even if it is obvious from the
|
|
|
|
context which type they belong to; this is to enable consistent
|
|
|
|
cross-references. If you describe methods belonging to an abstract protocol,
|
|
|
|
such as "context managers", include a (pseudo-)type name too to make the
|
|
|
|
index entries more informative.
|
|
|
|
|
|
|
|
The directives are:
|
|
|
|
|
|
|
|
.. describe:: cfunction
|
|
|
|
|
|
|
|
Describes a C function. The signature should be given as in C, e.g.::
|
|
|
|
|
|
|
|
.. cfunction:: PyObject* PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems)
|
|
|
|
|
|
|
|
This is also used to describe function-like preprocessor macros. The names
|
|
|
|
of the arguments should be given so they may be used in the description.
|
|
|
|
|
|
|
|
Note that you don't have to backslash-escape asterisks in the signature,
|
|
|
|
as it is not parsed by the reST inliner.
|
|
|
|
|
|
|
|
.. describe:: cmember
|
|
|
|
|
|
|
|
Describes a C struct member. Example signature::
|
|
|
|
|
|
|
|
.. cmember:: PyObject* PyTypeObject.tp_bases
|
|
|
|
|
|
|
|
The text of the description should include the range of values allowed, how
|
|
|
|
the value should be interpreted, and whether the value can be changed.
|
|
|
|
References to structure members in text should use the ``member`` role.
|
|
|
|
|
|
|
|
.. describe:: cmacro
|
|
|
|
|
|
|
|
Describes a "simple" C macro. Simple macros are macros which are used
|
|
|
|
for code expansion, but which do not take arguments so cannot be described as
|
|
|
|
functions. This is not to be used for simple constant definitions. Examples
|
|
|
|
of its use in the Python documentation include :cmacro:`PyObject_HEAD` and
|
|
|
|
:cmacro:`Py_BEGIN_ALLOW_THREADS`.
|
|
|
|
|
|
|
|
.. describe:: ctype
|
|
|
|
|
|
|
|
Describes a C type. The signature should just be the type name.
|
|
|
|
|
|
|
|
.. describe:: cvar
|
|
|
|
|
|
|
|
Describes a global C variable. The signature should include the type, such
|
|
|
|
as::
|
|
|
|
|
|
|
|
.. cvar:: PyObject* PyClass_Type
|
|
|
|
|
|
|
|
.. describe:: data
|
|
|
|
|
|
|
|
Describes global data in a module, including both variables and values used
|
|
|
|
as "defined constants." Class and object attributes are not documented
|
|
|
|
using this environment.
|
|
|
|
|
|
|
|
.. describe:: exception
|
|
|
|
|
|
|
|
Describes an exception class. The signature can, but need not include
|
|
|
|
parentheses with constructor arguments.
|
|
|
|
|
|
|
|
.. describe:: function
|
|
|
|
|
|
|
|
Describes a module-level function. The signature should include the
|
|
|
|
parameters, enclosing optional parameters in brackets. Default values can be
|
|
|
|
given if it enhances clarity. For example::
|
|
|
|
|
|
|
|
.. function:: Timer.repeat([repeat=3[, number=1000000]])
|
|
|
|
|
|
|
|
Object methods are not documented using this directive. Bound object methods
|
|
|
|
placed in the module namespace as part of the public interface of the module
|
|
|
|
are documented using this, as they are equivalent to normal functions for
|
|
|
|
most purposes.
|
|
|
|
|
|
|
|
The description should include information about the parameters required and
|
|
|
|
how they are used (especially whether mutable objects passed as parameters
|
|
|
|
are modified), side effects, and possible exceptions. A small example may be
|
|
|
|
provided.
|
|
|
|
|
|
|
|
.. describe:: class
|
|
|
|
|
|
|
|
Describes a class. The signature can include parentheses with parameters
|
|
|
|
which will be shown as the constructor arguments.
|
|
|
|
|
|
|
|
.. describe:: attribute
|
|
|
|
|
|
|
|
Describes an object data attribute. The description should include
|
|
|
|
information about the type of the data to be expected and whether it may be
|
|
|
|
changed directly.
|
|
|
|
|
|
|
|
.. describe:: method
|
|
|
|
|
|
|
|
Describes an object method. The parameters should not include the ``self``
|
|
|
|
parameter. The description should include similar information to that
|
|
|
|
described for ``function``.
|
|
|
|
|
|
|
|
.. describe:: opcode
|
|
|
|
|
2007-10-21 07:24:20 -03:00
|
|
|
Describes a Python :term:`bytecode` instruction.
|
2007-08-15 11:28:01 -03:00
|
|
|
|
2007-10-20 10:36:24 -03:00
|
|
|
.. describe:: cmdoption
|
|
|
|
|
|
|
|
Describes a command line option or switch. Option argument names should be
|
|
|
|
enclosed in angle brackets. Example::
|
|
|
|
|
|
|
|
.. cmdoption:: -m <module>
|
|
|
|
|
|
|
|
Run a module as a script.
|
2007-08-15 11:28:01 -03:00
|
|
|
|
2007-10-20 14:51:39 -03:00
|
|
|
.. describe:: envvar
|
|
|
|
|
|
|
|
Describes an environment variable that Python uses or defines.
|
|
|
|
|
|
|
|
|
2007-08-15 11:28:01 -03:00
|
|
|
There is also a generic version of these directives:
|
|
|
|
|
|
|
|
.. describe:: describe
|
|
|
|
|
|
|
|
This directive produces the same formatting as the specific ones explained
|
|
|
|
above but does not create index entries or cross-referencing targets. It is
|
|
|
|
used, for example, to describe the directives in this document. Example::
|
|
|
|
|
|
|
|
.. describe:: opcode
|
|
|
|
|
|
|
|
Describes a Python bytecode instruction.
|
|
|
|
|
|
|
|
|
|
|
|
Showing code examples
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
Examples of Python source code or interactive sessions are represented using
|
|
|
|
standard reST literal blocks. They are started by a ``::`` at the end of the
|
|
|
|
preceding paragraph and delimited by indentation.
|
|
|
|
|
|
|
|
Representing an interactive session requires including the prompts and output
|
|
|
|
along with the Python code. No special markup is required for interactive
|
|
|
|
sessions. After the last line of input or output presented, there should not be
|
|
|
|
an "unused" primary prompt; this is an example of what *not* to do::
|
|
|
|
|
|
|
|
>>> 1 + 1
|
|
|
|
2
|
|
|
|
>>>
|
|
|
|
|
|
|
|
Syntax highlighting is handled in a smart way:
|
|
|
|
|
|
|
|
* There is a "highlighting language" for each source file. Per default,
|
|
|
|
this is ``'python'`` as the majority of files will have to highlight Python
|
|
|
|
snippets.
|
|
|
|
|
|
|
|
* Within Python highlighting mode, interactive sessions are recognized
|
|
|
|
automatically and highlighted appropriately.
|
|
|
|
|
|
|
|
* The highlighting language can be changed using the ``highlightlang``
|
|
|
|
directive, used as follows::
|
|
|
|
|
|
|
|
.. highlightlang:: c
|
|
|
|
|
|
|
|
This language is used until the next ``highlightlang`` directive is
|
|
|
|
encountered.
|
|
|
|
|
Merged revisions 67154,67157-67159,67162-67163,67166,67175-67176,67189,67224-67225,67243 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r67154 | hirokazu.yamamoto | 2008-11-08 04:46:17 +0100 (Sat, 08 Nov 2008) | 1 line
Issue #4071: ntpath.abspath returned an empty string for long unicode path.
........
r67157 | georg.brandl | 2008-11-08 12:47:44 +0100 (Sat, 08 Nov 2008) | 2 lines
Don't use "HOWTO" as the title for all howto .tex files.
........
r67158 | georg.brandl | 2008-11-08 12:48:20 +0100 (Sat, 08 Nov 2008) | 2 lines
Update "Documenting" a bit. Concentrate on Python-specifics.
........
r67159 | georg.brandl | 2008-11-08 13:52:25 +0100 (Sat, 08 Nov 2008) | 2 lines
Fix warning.
........
r67162 | benjamin.peterson | 2008-11-08 17:55:33 +0100 (Sat, 08 Nov 2008) | 1 line
a few compile() and ast doc improvements
........
r67163 | benjamin.peterson | 2008-11-08 18:04:18 +0100 (Sat, 08 Nov 2008) | 1 line
move context clue to versionchanged tag
........
r67166 | benjamin.peterson | 2008-11-08 18:07:06 +0100 (Sat, 08 Nov 2008) | 1 line
clarify what was added
........
r67175 | benjamin.peterson | 2008-11-09 02:44:32 +0100 (Sun, 09 Nov 2008) | 1 line
update link
........
r67176 | benjamin.peterson | 2008-11-09 02:52:32 +0100 (Sun, 09 Nov 2008) | 1 line
fix comment
........
r67189 | benjamin.peterson | 2008-11-11 22:56:06 +0100 (Tue, 11 Nov 2008) | 1 line
use correct name
........
r67224 | georg.brandl | 2008-11-15 09:10:04 +0100 (Sat, 15 Nov 2008) | 2 lines
#4324: fix getlocale() argument.
........
r67225 | brett.cannon | 2008-11-15 23:33:25 +0100 (Sat, 15 Nov 2008) | 1 line
Clarify the docs for the 'strict' argument to httplib.HTTPConnection.
........
r67243 | benjamin.peterson | 2008-11-17 22:39:05 +0100 (Mon, 17 Nov 2008) | 1 line
a few fixes on the download page
........
2008-12-05 04:35:09 -04:00
|
|
|
* The values normally used for the highlighting language are:
|
2007-08-15 11:28:01 -03:00
|
|
|
|
|
|
|
* ``python`` (the default)
|
|
|
|
* ``c``
|
|
|
|
* ``rest``
|
|
|
|
* ``none`` (no highlighting)
|
|
|
|
|
|
|
|
* If highlighting with the current language fails, the block is not highlighted
|
|
|
|
in any way.
|
|
|
|
|
|
|
|
Longer displays of verbatim text may be included by storing the example text in
|
|
|
|
an external file containing only plain text. The file may be included using the
|
|
|
|
``literalinclude`` directive. [1]_ For example, to include the Python source file
|
|
|
|
:file:`example.py`, use::
|
|
|
|
|
|
|
|
.. literalinclude:: example.py
|
|
|
|
|
|
|
|
The file name is relative to the current file's path. Documentation-specific
|
|
|
|
include files should be placed in the ``Doc/includes`` subdirectory.
|
|
|
|
|
|
|
|
|
|
|
|
Inline markup
|
|
|
|
-------------
|
|
|
|
|
|
|
|
As said before, Sphinx uses interpreted text roles to insert semantic markup in
|
|
|
|
documents.
|
|
|
|
|
Merged revisions 68582,68718,68720-68721,68724-68727,68859,68973,69288-69289,69293,69295,69297-69301,69409,69414,69570,69573,69576,69728-69730,69769,69776,69803-69805,69840,69896 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68582 | georg.brandl | 2009-01-13 23:14:01 +0100 (Di, 13 Jan 2009) | 2 lines
Use assertRaises.
........
r68718 | georg.brandl | 2009-01-18 11:42:35 +0100 (So, 18 Jan 2009) | 1 line
#4976: union() and intersection() take multiple args, but talk about "the other".
........
r68720 | georg.brandl | 2009-01-18 11:45:22 +0100 (So, 18 Jan 2009) | 1 line
#4974: fix redundant mention of lists and tuples.
........
r68721 | georg.brandl | 2009-01-18 11:48:16 +0100 (So, 18 Jan 2009) | 1 line
#4914: trunc is in math.
........
r68724 | georg.brandl | 2009-01-18 14:24:10 +0100 (So, 18 Jan 2009) | 1 line
#4979: correct result range for some random functions.
........
r68725 | georg.brandl | 2009-01-18 14:47:26 +0100 (So, 18 Jan 2009) | 1 line
#4857: fix augmented assignment target spec.
........
r68726 | georg.brandl | 2009-01-18 15:41:52 +0100 (So, 18 Jan 2009) | 1 line
#4923: clarify what was added.
........
r68727 | georg.brandl | 2009-01-18 19:25:30 +0100 (So, 18 Jan 2009) | 1 line
#4986: augassigns are not expressions.
........
r68859 | georg.brandl | 2009-01-22 19:29:28 +0100 (Do, 22 Jan 2009) | 2 lines
Clarify wording.
........
r68973 | georg.brandl | 2009-01-26 22:29:38 +0100 (Mo, 26 Jan 2009) | 2 lines
Copy over docs on advanced role features from Sphinx docs.
........
r69288 | georg.brandl | 2009-02-05 11:30:57 +0100 (Do, 05 Feb 2009) | 1 line
#5153: fix typo in example.
........
r69289 | georg.brandl | 2009-02-05 11:37:07 +0100 (Do, 05 Feb 2009) | 1 line
#5144: document that PySys_SetArgv prepends the script directory (or the empty string) to sys.path.
........
r69293 | georg.brandl | 2009-02-05 11:59:28 +0100 (Do, 05 Feb 2009) | 1 line
#5059: fix example.
........
r69295 | georg.brandl | 2009-02-05 12:23:47 +0100 (Do, 05 Feb 2009) | 1 line
PyErr_PrintEx is also in 2.x...
........
r69297 | georg.brandl | 2009-02-05 12:32:18 +0100 (Do, 05 Feb 2009) | 1 line
#5015: document PythonHome API functions.
........
r69298 | georg.brandl | 2009-02-05 12:33:21 +0100 (Do, 05 Feb 2009) | 1 line
#4827: fix callback example.
........
r69299 | georg.brandl | 2009-02-05 12:35:28 +0100 (Do, 05 Feb 2009) | 1 line
#4820: use correct module for ctypes.util.
........
r69300 | georg.brandl | 2009-02-05 12:38:23 +0100 (Do, 05 Feb 2009) | 1 line
#4563: disable alpha and roman lists, fixes wrong formatting of contributor list.
........
r69301 | georg.brandl | 2009-02-05 12:40:35 +0100 (Do, 05 Feb 2009) | 1 line
#5031: fix Thread.daemon property docs.
........
r69409 | georg.brandl | 2009-02-07 13:21:17 +0100 (Sa, 07 Feb 2009) | 1 line
#5174: fix wrong file closing in example.
........
r69414 | georg.brandl | 2009-02-07 19:49:54 +0100 (Sa, 07 Feb 2009) | 1 line
make "super only for new-style classes" a note.
........
r69570 | georg.brandl | 2009-02-13 11:40:14 +0100 (Fr, 13 Feb 2009) | 1 line
#4894: document "newurl" parameter to redirect_request().
........
r69573 | georg.brandl | 2009-02-13 11:44:17 +0100 (Fr, 13 Feb 2009) | 1 line
#3734: document complex coercing behavior better.
........
r69576 | georg.brandl | 2009-02-13 11:56:50 +0100 (Fr, 13 Feb 2009) | 1 line
#1661108: note that urlsafe encoded string can contain "=".
........
r69728 | georg.brandl | 2009-02-18 01:22:55 +0100 (Mi, 18 Feb 2009) | 2 lines
#5297: fix example.
........
r69729 | georg.brandl | 2009-02-18 01:25:13 +0100 (Mi, 18 Feb 2009) | 2 lines
#5296: sequence -> iterable.
........
r69730 | georg.brandl | 2009-02-18 01:31:36 +0100 (Mi, 18 Feb 2009) | 2 lines
#5268: mention VMSError.
........
r69769 | georg.brandl | 2009-02-19 09:30:06 +0100 (Do, 19 Feb 2009) | 1 line
#5310, #3558: fix operator precedence table.
........
r69776 | georg.brandl | 2009-02-19 17:34:51 +0100 (Do, 19 Feb 2009) | 2 lines
#5317: update IronPython URL.
........
r69803 | georg.brandl | 2009-02-20 08:48:21 +0100 (Fr, 20 Feb 2009) | 1 line
#5327: fix a broken link by joining it.
........
r69804 | georg.brandl | 2009-02-20 09:22:21 +0100 (Fr, 20 Feb 2009) | 1 line
At least separate imports from other statements.
........
r69805 | georg.brandl | 2009-02-20 09:45:47 +0100 (Fr, 20 Feb 2009) | 2 lines
Fix punctuation.
........
r69840 | georg.brandl | 2009-02-21 20:09:40 +0100 (Sa, 21 Feb 2009) | 1 line
#5338, #5339: two types in the API manual.
........
r69896 | georg.brandl | 2009-02-23 11:24:23 +0100 (Mo, 23 Feb 2009) | 1 line
#5348: format() converts all kinds of values.
........
2009-02-23 06:41:11 -04:00
|
|
|
Names of local variables, such as function/method arguments, are an exception,
|
|
|
|
they should be marked simply with ``*var*``.
|
2007-08-15 11:28:01 -03:00
|
|
|
|
|
|
|
For all other roles, you have to write ``:rolename:`content```.
|
|
|
|
|
Merged revisions 68582,68718,68720-68721,68724-68727,68859,68973,69288-69289,69293,69295,69297-69301,69409,69414,69570,69573,69576,69728-69730,69769,69776,69803-69805,69840,69896 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68582 | georg.brandl | 2009-01-13 23:14:01 +0100 (Di, 13 Jan 2009) | 2 lines
Use assertRaises.
........
r68718 | georg.brandl | 2009-01-18 11:42:35 +0100 (So, 18 Jan 2009) | 1 line
#4976: union() and intersection() take multiple args, but talk about "the other".
........
r68720 | georg.brandl | 2009-01-18 11:45:22 +0100 (So, 18 Jan 2009) | 1 line
#4974: fix redundant mention of lists and tuples.
........
r68721 | georg.brandl | 2009-01-18 11:48:16 +0100 (So, 18 Jan 2009) | 1 line
#4914: trunc is in math.
........
r68724 | georg.brandl | 2009-01-18 14:24:10 +0100 (So, 18 Jan 2009) | 1 line
#4979: correct result range for some random functions.
........
r68725 | georg.brandl | 2009-01-18 14:47:26 +0100 (So, 18 Jan 2009) | 1 line
#4857: fix augmented assignment target spec.
........
r68726 | georg.brandl | 2009-01-18 15:41:52 +0100 (So, 18 Jan 2009) | 1 line
#4923: clarify what was added.
........
r68727 | georg.brandl | 2009-01-18 19:25:30 +0100 (So, 18 Jan 2009) | 1 line
#4986: augassigns are not expressions.
........
r68859 | georg.brandl | 2009-01-22 19:29:28 +0100 (Do, 22 Jan 2009) | 2 lines
Clarify wording.
........
r68973 | georg.brandl | 2009-01-26 22:29:38 +0100 (Mo, 26 Jan 2009) | 2 lines
Copy over docs on advanced role features from Sphinx docs.
........
r69288 | georg.brandl | 2009-02-05 11:30:57 +0100 (Do, 05 Feb 2009) | 1 line
#5153: fix typo in example.
........
r69289 | georg.brandl | 2009-02-05 11:37:07 +0100 (Do, 05 Feb 2009) | 1 line
#5144: document that PySys_SetArgv prepends the script directory (or the empty string) to sys.path.
........
r69293 | georg.brandl | 2009-02-05 11:59:28 +0100 (Do, 05 Feb 2009) | 1 line
#5059: fix example.
........
r69295 | georg.brandl | 2009-02-05 12:23:47 +0100 (Do, 05 Feb 2009) | 1 line
PyErr_PrintEx is also in 2.x...
........
r69297 | georg.brandl | 2009-02-05 12:32:18 +0100 (Do, 05 Feb 2009) | 1 line
#5015: document PythonHome API functions.
........
r69298 | georg.brandl | 2009-02-05 12:33:21 +0100 (Do, 05 Feb 2009) | 1 line
#4827: fix callback example.
........
r69299 | georg.brandl | 2009-02-05 12:35:28 +0100 (Do, 05 Feb 2009) | 1 line
#4820: use correct module for ctypes.util.
........
r69300 | georg.brandl | 2009-02-05 12:38:23 +0100 (Do, 05 Feb 2009) | 1 line
#4563: disable alpha and roman lists, fixes wrong formatting of contributor list.
........
r69301 | georg.brandl | 2009-02-05 12:40:35 +0100 (Do, 05 Feb 2009) | 1 line
#5031: fix Thread.daemon property docs.
........
r69409 | georg.brandl | 2009-02-07 13:21:17 +0100 (Sa, 07 Feb 2009) | 1 line
#5174: fix wrong file closing in example.
........
r69414 | georg.brandl | 2009-02-07 19:49:54 +0100 (Sa, 07 Feb 2009) | 1 line
make "super only for new-style classes" a note.
........
r69570 | georg.brandl | 2009-02-13 11:40:14 +0100 (Fr, 13 Feb 2009) | 1 line
#4894: document "newurl" parameter to redirect_request().
........
r69573 | georg.brandl | 2009-02-13 11:44:17 +0100 (Fr, 13 Feb 2009) | 1 line
#3734: document complex coercing behavior better.
........
r69576 | georg.brandl | 2009-02-13 11:56:50 +0100 (Fr, 13 Feb 2009) | 1 line
#1661108: note that urlsafe encoded string can contain "=".
........
r69728 | georg.brandl | 2009-02-18 01:22:55 +0100 (Mi, 18 Feb 2009) | 2 lines
#5297: fix example.
........
r69729 | georg.brandl | 2009-02-18 01:25:13 +0100 (Mi, 18 Feb 2009) | 2 lines
#5296: sequence -> iterable.
........
r69730 | georg.brandl | 2009-02-18 01:31:36 +0100 (Mi, 18 Feb 2009) | 2 lines
#5268: mention VMSError.
........
r69769 | georg.brandl | 2009-02-19 09:30:06 +0100 (Do, 19 Feb 2009) | 1 line
#5310, #3558: fix operator precedence table.
........
r69776 | georg.brandl | 2009-02-19 17:34:51 +0100 (Do, 19 Feb 2009) | 2 lines
#5317: update IronPython URL.
........
r69803 | georg.brandl | 2009-02-20 08:48:21 +0100 (Fr, 20 Feb 2009) | 1 line
#5327: fix a broken link by joining it.
........
r69804 | georg.brandl | 2009-02-20 09:22:21 +0100 (Fr, 20 Feb 2009) | 1 line
At least separate imports from other statements.
........
r69805 | georg.brandl | 2009-02-20 09:45:47 +0100 (Fr, 20 Feb 2009) | 2 lines
Fix punctuation.
........
r69840 | georg.brandl | 2009-02-21 20:09:40 +0100 (Sa, 21 Feb 2009) | 1 line
#5338, #5339: two types in the API manual.
........
r69896 | georg.brandl | 2009-02-23 11:24:23 +0100 (Mo, 23 Feb 2009) | 1 line
#5348: format() converts all kinds of values.
........
2009-02-23 06:41:11 -04:00
|
|
|
There are some additional facilities that make cross-referencing roles more
|
|
|
|
versatile:
|
|
|
|
|
|
|
|
* You may supply an explicit title and reference target, like in reST direct
|
|
|
|
hyperlinks: ``:role:`title <target>``` will refer to *target*, but the link
|
|
|
|
text will be *title*.
|
|
|
|
|
|
|
|
* If you prefix the content with ``!``, no reference/hyperlink will be created.
|
|
|
|
|
|
|
|
* For the Python object roles, if you prefix the content with ``~``, the link
|
|
|
|
text will only be the last component of the target. For example,
|
|
|
|
``:meth:`~Queue.Queue.get``` will refer to ``Queue.Queue.get`` but only
|
|
|
|
display ``get`` as the link text.
|
2007-08-17 13:54:59 -03:00
|
|
|
|
Merged revisions 68582,68718,68720-68721,68724-68727,68859,68973,69288-69289,69293,69295,69297-69301,69409,69414,69570,69573,69576,69728-69730,69769,69776,69803-69805,69840,69896 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68582 | georg.brandl | 2009-01-13 23:14:01 +0100 (Di, 13 Jan 2009) | 2 lines
Use assertRaises.
........
r68718 | georg.brandl | 2009-01-18 11:42:35 +0100 (So, 18 Jan 2009) | 1 line
#4976: union() and intersection() take multiple args, but talk about "the other".
........
r68720 | georg.brandl | 2009-01-18 11:45:22 +0100 (So, 18 Jan 2009) | 1 line
#4974: fix redundant mention of lists and tuples.
........
r68721 | georg.brandl | 2009-01-18 11:48:16 +0100 (So, 18 Jan 2009) | 1 line
#4914: trunc is in math.
........
r68724 | georg.brandl | 2009-01-18 14:24:10 +0100 (So, 18 Jan 2009) | 1 line
#4979: correct result range for some random functions.
........
r68725 | georg.brandl | 2009-01-18 14:47:26 +0100 (So, 18 Jan 2009) | 1 line
#4857: fix augmented assignment target spec.
........
r68726 | georg.brandl | 2009-01-18 15:41:52 +0100 (So, 18 Jan 2009) | 1 line
#4923: clarify what was added.
........
r68727 | georg.brandl | 2009-01-18 19:25:30 +0100 (So, 18 Jan 2009) | 1 line
#4986: augassigns are not expressions.
........
r68859 | georg.brandl | 2009-01-22 19:29:28 +0100 (Do, 22 Jan 2009) | 2 lines
Clarify wording.
........
r68973 | georg.brandl | 2009-01-26 22:29:38 +0100 (Mo, 26 Jan 2009) | 2 lines
Copy over docs on advanced role features from Sphinx docs.
........
r69288 | georg.brandl | 2009-02-05 11:30:57 +0100 (Do, 05 Feb 2009) | 1 line
#5153: fix typo in example.
........
r69289 | georg.brandl | 2009-02-05 11:37:07 +0100 (Do, 05 Feb 2009) | 1 line
#5144: document that PySys_SetArgv prepends the script directory (or the empty string) to sys.path.
........
r69293 | georg.brandl | 2009-02-05 11:59:28 +0100 (Do, 05 Feb 2009) | 1 line
#5059: fix example.
........
r69295 | georg.brandl | 2009-02-05 12:23:47 +0100 (Do, 05 Feb 2009) | 1 line
PyErr_PrintEx is also in 2.x...
........
r69297 | georg.brandl | 2009-02-05 12:32:18 +0100 (Do, 05 Feb 2009) | 1 line
#5015: document PythonHome API functions.
........
r69298 | georg.brandl | 2009-02-05 12:33:21 +0100 (Do, 05 Feb 2009) | 1 line
#4827: fix callback example.
........
r69299 | georg.brandl | 2009-02-05 12:35:28 +0100 (Do, 05 Feb 2009) | 1 line
#4820: use correct module for ctypes.util.
........
r69300 | georg.brandl | 2009-02-05 12:38:23 +0100 (Do, 05 Feb 2009) | 1 line
#4563: disable alpha and roman lists, fixes wrong formatting of contributor list.
........
r69301 | georg.brandl | 2009-02-05 12:40:35 +0100 (Do, 05 Feb 2009) | 1 line
#5031: fix Thread.daemon property docs.
........
r69409 | georg.brandl | 2009-02-07 13:21:17 +0100 (Sa, 07 Feb 2009) | 1 line
#5174: fix wrong file closing in example.
........
r69414 | georg.brandl | 2009-02-07 19:49:54 +0100 (Sa, 07 Feb 2009) | 1 line
make "super only for new-style classes" a note.
........
r69570 | georg.brandl | 2009-02-13 11:40:14 +0100 (Fr, 13 Feb 2009) | 1 line
#4894: document "newurl" parameter to redirect_request().
........
r69573 | georg.brandl | 2009-02-13 11:44:17 +0100 (Fr, 13 Feb 2009) | 1 line
#3734: document complex coercing behavior better.
........
r69576 | georg.brandl | 2009-02-13 11:56:50 +0100 (Fr, 13 Feb 2009) | 1 line
#1661108: note that urlsafe encoded string can contain "=".
........
r69728 | georg.brandl | 2009-02-18 01:22:55 +0100 (Mi, 18 Feb 2009) | 2 lines
#5297: fix example.
........
r69729 | georg.brandl | 2009-02-18 01:25:13 +0100 (Mi, 18 Feb 2009) | 2 lines
#5296: sequence -> iterable.
........
r69730 | georg.brandl | 2009-02-18 01:31:36 +0100 (Mi, 18 Feb 2009) | 2 lines
#5268: mention VMSError.
........
r69769 | georg.brandl | 2009-02-19 09:30:06 +0100 (Do, 19 Feb 2009) | 1 line
#5310, #3558: fix operator precedence table.
........
r69776 | georg.brandl | 2009-02-19 17:34:51 +0100 (Do, 19 Feb 2009) | 2 lines
#5317: update IronPython URL.
........
r69803 | georg.brandl | 2009-02-20 08:48:21 +0100 (Fr, 20 Feb 2009) | 1 line
#5327: fix a broken link by joining it.
........
r69804 | georg.brandl | 2009-02-20 09:22:21 +0100 (Fr, 20 Feb 2009) | 1 line
At least separate imports from other statements.
........
r69805 | georg.brandl | 2009-02-20 09:45:47 +0100 (Fr, 20 Feb 2009) | 2 lines
Fix punctuation.
........
r69840 | georg.brandl | 2009-02-21 20:09:40 +0100 (Sa, 21 Feb 2009) | 1 line
#5338, #5339: two types in the API manual.
........
r69896 | georg.brandl | 2009-02-23 11:24:23 +0100 (Mo, 23 Feb 2009) | 1 line
#5348: format() converts all kinds of values.
........
2009-02-23 06:41:11 -04:00
|
|
|
In HTML output, the link's ``title`` attribute (that is e.g. shown as a
|
|
|
|
tool-tip on mouse-hover) will always be the full target name.
|
2007-08-17 13:54:59 -03:00
|
|
|
|
2007-08-15 11:28:01 -03:00
|
|
|
The following roles refer to objects in modules and are possibly hyperlinked if
|
|
|
|
a matching identifier is found:
|
|
|
|
|
|
|
|
.. describe:: mod
|
|
|
|
|
|
|
|
The name of a module; a dotted name may be used. This should also be used for
|
|
|
|
package names.
|
|
|
|
|
|
|
|
.. describe:: func
|
|
|
|
|
|
|
|
The name of a Python function; dotted names may be used. The role text
|
2008-04-19 14:00:14 -03:00
|
|
|
should not include trailing parentheses to enhance readability. The
|
|
|
|
parentheses are stripped when searching for identifiers.
|
2007-08-15 11:28:01 -03:00
|
|
|
|
|
|
|
.. describe:: data
|
|
|
|
|
Merged revisions 68582,68718,68720-68721,68724-68727,68859,68973,69288-69289,69293,69295,69297-69301,69409,69414,69570,69573,69576,69728-69730,69769,69776,69803-69805,69840,69896 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68582 | georg.brandl | 2009-01-13 23:14:01 +0100 (Di, 13 Jan 2009) | 2 lines
Use assertRaises.
........
r68718 | georg.brandl | 2009-01-18 11:42:35 +0100 (So, 18 Jan 2009) | 1 line
#4976: union() and intersection() take multiple args, but talk about "the other".
........
r68720 | georg.brandl | 2009-01-18 11:45:22 +0100 (So, 18 Jan 2009) | 1 line
#4974: fix redundant mention of lists and tuples.
........
r68721 | georg.brandl | 2009-01-18 11:48:16 +0100 (So, 18 Jan 2009) | 1 line
#4914: trunc is in math.
........
r68724 | georg.brandl | 2009-01-18 14:24:10 +0100 (So, 18 Jan 2009) | 1 line
#4979: correct result range for some random functions.
........
r68725 | georg.brandl | 2009-01-18 14:47:26 +0100 (So, 18 Jan 2009) | 1 line
#4857: fix augmented assignment target spec.
........
r68726 | georg.brandl | 2009-01-18 15:41:52 +0100 (So, 18 Jan 2009) | 1 line
#4923: clarify what was added.
........
r68727 | georg.brandl | 2009-01-18 19:25:30 +0100 (So, 18 Jan 2009) | 1 line
#4986: augassigns are not expressions.
........
r68859 | georg.brandl | 2009-01-22 19:29:28 +0100 (Do, 22 Jan 2009) | 2 lines
Clarify wording.
........
r68973 | georg.brandl | 2009-01-26 22:29:38 +0100 (Mo, 26 Jan 2009) | 2 lines
Copy over docs on advanced role features from Sphinx docs.
........
r69288 | georg.brandl | 2009-02-05 11:30:57 +0100 (Do, 05 Feb 2009) | 1 line
#5153: fix typo in example.
........
r69289 | georg.brandl | 2009-02-05 11:37:07 +0100 (Do, 05 Feb 2009) | 1 line
#5144: document that PySys_SetArgv prepends the script directory (or the empty string) to sys.path.
........
r69293 | georg.brandl | 2009-02-05 11:59:28 +0100 (Do, 05 Feb 2009) | 1 line
#5059: fix example.
........
r69295 | georg.brandl | 2009-02-05 12:23:47 +0100 (Do, 05 Feb 2009) | 1 line
PyErr_PrintEx is also in 2.x...
........
r69297 | georg.brandl | 2009-02-05 12:32:18 +0100 (Do, 05 Feb 2009) | 1 line
#5015: document PythonHome API functions.
........
r69298 | georg.brandl | 2009-02-05 12:33:21 +0100 (Do, 05 Feb 2009) | 1 line
#4827: fix callback example.
........
r69299 | georg.brandl | 2009-02-05 12:35:28 +0100 (Do, 05 Feb 2009) | 1 line
#4820: use correct module for ctypes.util.
........
r69300 | georg.brandl | 2009-02-05 12:38:23 +0100 (Do, 05 Feb 2009) | 1 line
#4563: disable alpha and roman lists, fixes wrong formatting of contributor list.
........
r69301 | georg.brandl | 2009-02-05 12:40:35 +0100 (Do, 05 Feb 2009) | 1 line
#5031: fix Thread.daemon property docs.
........
r69409 | georg.brandl | 2009-02-07 13:21:17 +0100 (Sa, 07 Feb 2009) | 1 line
#5174: fix wrong file closing in example.
........
r69414 | georg.brandl | 2009-02-07 19:49:54 +0100 (Sa, 07 Feb 2009) | 1 line
make "super only for new-style classes" a note.
........
r69570 | georg.brandl | 2009-02-13 11:40:14 +0100 (Fr, 13 Feb 2009) | 1 line
#4894: document "newurl" parameter to redirect_request().
........
r69573 | georg.brandl | 2009-02-13 11:44:17 +0100 (Fr, 13 Feb 2009) | 1 line
#3734: document complex coercing behavior better.
........
r69576 | georg.brandl | 2009-02-13 11:56:50 +0100 (Fr, 13 Feb 2009) | 1 line
#1661108: note that urlsafe encoded string can contain "=".
........
r69728 | georg.brandl | 2009-02-18 01:22:55 +0100 (Mi, 18 Feb 2009) | 2 lines
#5297: fix example.
........
r69729 | georg.brandl | 2009-02-18 01:25:13 +0100 (Mi, 18 Feb 2009) | 2 lines
#5296: sequence -> iterable.
........
r69730 | georg.brandl | 2009-02-18 01:31:36 +0100 (Mi, 18 Feb 2009) | 2 lines
#5268: mention VMSError.
........
r69769 | georg.brandl | 2009-02-19 09:30:06 +0100 (Do, 19 Feb 2009) | 1 line
#5310, #3558: fix operator precedence table.
........
r69776 | georg.brandl | 2009-02-19 17:34:51 +0100 (Do, 19 Feb 2009) | 2 lines
#5317: update IronPython URL.
........
r69803 | georg.brandl | 2009-02-20 08:48:21 +0100 (Fr, 20 Feb 2009) | 1 line
#5327: fix a broken link by joining it.
........
r69804 | georg.brandl | 2009-02-20 09:22:21 +0100 (Fr, 20 Feb 2009) | 1 line
At least separate imports from other statements.
........
r69805 | georg.brandl | 2009-02-20 09:45:47 +0100 (Fr, 20 Feb 2009) | 2 lines
Fix punctuation.
........
r69840 | georg.brandl | 2009-02-21 20:09:40 +0100 (Sa, 21 Feb 2009) | 1 line
#5338, #5339: two types in the API manual.
........
r69896 | georg.brandl | 2009-02-23 11:24:23 +0100 (Mo, 23 Feb 2009) | 1 line
#5348: format() converts all kinds of values.
........
2009-02-23 06:41:11 -04:00
|
|
|
The name of a module-level variable or constant.
|
2007-08-15 11:28:01 -03:00
|
|
|
|
|
|
|
.. describe:: const
|
|
|
|
|
|
|
|
The name of a "defined" constant. This may be a C-language ``#define``
|
|
|
|
or a Python variable that is not intended to be changed.
|
|
|
|
|
|
|
|
.. describe:: class
|
|
|
|
|
|
|
|
A class name; a dotted name may be used.
|
|
|
|
|
|
|
|
.. describe:: meth
|
|
|
|
|
|
|
|
The name of a method of an object. The role text should include the type
|
2008-04-19 14:00:14 -03:00
|
|
|
name and the method name. A dotted name may be used.
|
2007-08-15 11:28:01 -03:00
|
|
|
|
|
|
|
.. describe:: attr
|
|
|
|
|
|
|
|
The name of a data attribute of an object.
|
|
|
|
|
|
|
|
.. describe:: exc
|
|
|
|
|
|
|
|
The name of an exception. A dotted name may be used.
|
|
|
|
|
|
|
|
The name enclosed in this markup can include a module name and/or a class name.
|
|
|
|
For example, ``:func:`filter``` could refer to a function named ``filter`` in
|
|
|
|
the current module, or the built-in function of that name. In contrast,
|
|
|
|
``:func:`foo.filter``` clearly refers to the ``filter`` function in the ``foo``
|
|
|
|
module.
|
|
|
|
|
2007-08-15 15:41:25 -03:00
|
|
|
Normally, names in these roles are searched first without any further
|
|
|
|
qualification, then with the current module name prepended, then with the
|
|
|
|
current module and class name (if any) prepended. If you prefix the name with a
|
|
|
|
dot, this order is reversed. For example, in the documentation of the
|
|
|
|
:mod:`codecs` module, ``:func:`open``` always refers to the built-in function,
|
|
|
|
while ``:func:`.open``` refers to :func:`codecs.open`.
|
|
|
|
|
2007-08-15 11:28:01 -03:00
|
|
|
A similar heuristic is used to determine whether the name is an attribute of
|
|
|
|
the currently documented class.
|
|
|
|
|
|
|
|
The following roles create cross-references to C-language constructs if they
|
|
|
|
are defined in the API documentation:
|
|
|
|
|
|
|
|
.. describe:: cdata
|
|
|
|
|
|
|
|
The name of a C-language variable.
|
|
|
|
|
|
|
|
.. describe:: cfunc
|
|
|
|
|
|
|
|
The name of a C-language function. Should include trailing parentheses.
|
|
|
|
|
|
|
|
.. describe:: cmacro
|
|
|
|
|
|
|
|
The name of a "simple" C macro, as defined above.
|
|
|
|
|
|
|
|
.. describe:: ctype
|
|
|
|
|
|
|
|
The name of a C-language type.
|
|
|
|
|
|
|
|
|
|
|
|
The following role does possibly create a cross-reference, but does not refer
|
|
|
|
to objects:
|
|
|
|
|
|
|
|
.. describe:: token
|
|
|
|
|
|
|
|
The name of a grammar token (used in the reference manual to create links
|
|
|
|
between production displays).
|
|
|
|
|
2007-08-17 03:27:11 -03:00
|
|
|
|
|
|
|
The following role creates a cross-reference to the term in the glossary:
|
|
|
|
|
|
|
|
.. describe:: term
|
|
|
|
|
|
|
|
Reference to a term in the glossary. The glossary is created using the
|
|
|
|
``glossary`` directive containing a definition list with terms and
|
|
|
|
definitions. It does not have to be in the same file as the ``term``
|
|
|
|
markup, in fact, by default the Python docs have one global glossary
|
|
|
|
in the ``glossary.rst`` file.
|
|
|
|
|
|
|
|
If you use a term that's not explained in a glossary, you'll get a warning
|
|
|
|
during build.
|
|
|
|
|
2007-08-15 11:28:01 -03:00
|
|
|
---------
|
|
|
|
|
|
|
|
The following roles don't do anything special except formatting the text
|
|
|
|
in a different style:
|
|
|
|
|
|
|
|
.. describe:: command
|
|
|
|
|
|
|
|
The name of an OS-level command, such as ``rm``.
|
|
|
|
|
|
|
|
.. describe:: dfn
|
|
|
|
|
|
|
|
Mark the defining instance of a term in the text. (No index entries are
|
|
|
|
generated.)
|
|
|
|
|
|
|
|
.. describe:: envvar
|
|
|
|
|
|
|
|
An environment variable. Index entries are generated.
|
|
|
|
|
|
|
|
.. describe:: file
|
|
|
|
|
|
|
|
The name of a file or directory. Within the contents, you can use curly
|
|
|
|
braces to indicate a "variable" part, for example::
|
|
|
|
|
|
|
|
... is installed in :file:`/usr/lib/python2.{x}/site-packages` ...
|
|
|
|
|
|
|
|
In the built documentation, the ``x`` will be displayed differently to
|
|
|
|
indicate that it is to be replaced by the Python minor version.
|
|
|
|
|
|
|
|
.. describe:: guilabel
|
|
|
|
|
|
|
|
Labels presented as part of an interactive user interface should be marked
|
|
|
|
using ``guilabel``. This includes labels from text-based interfaces such as
|
|
|
|
those created using :mod:`curses` or other text-based libraries. Any label
|
|
|
|
used in the interface should be marked with this role, including button
|
|
|
|
labels, window titles, field names, menu and menu selection names, and even
|
|
|
|
values in selection lists.
|
|
|
|
|
|
|
|
.. describe:: kbd
|
|
|
|
|
|
|
|
Mark a sequence of keystrokes. What form the key sequence takes may depend
|
|
|
|
on platform- or application-specific conventions. When there are no relevant
|
|
|
|
conventions, the names of modifier keys should be spelled out, to improve
|
|
|
|
accessibility for new users and non-native speakers. For example, an
|
|
|
|
*xemacs* key sequence may be marked like ``:kbd:`C-x C-f```, but without
|
|
|
|
reference to a specific application or platform, the same sequence should be
|
|
|
|
marked as ``:kbd:`Control-x Control-f```.
|
|
|
|
|
|
|
|
.. describe:: keyword
|
|
|
|
|
2007-12-29 06:57:00 -04:00
|
|
|
The name of a keyword in Python.
|
2007-08-15 11:28:01 -03:00
|
|
|
|
|
|
|
.. describe:: mailheader
|
|
|
|
|
|
|
|
The name of an RFC 822-style mail header. This markup does not imply that
|
|
|
|
the header is being used in an email message, but can be used to refer to any
|
|
|
|
header of the same "style." This is also used for headers defined by the
|
|
|
|
various MIME specifications. The header name should be entered in the same
|
|
|
|
way it would normally be found in practice, with the camel-casing conventions
|
|
|
|
being preferred where there is more than one common usage. For example:
|
|
|
|
``:mailheader:`Content-Type```.
|
|
|
|
|
|
|
|
.. describe:: makevar
|
|
|
|
|
|
|
|
The name of a :command:`make` variable.
|
|
|
|
|
|
|
|
.. describe:: manpage
|
|
|
|
|
|
|
|
A reference to a Unix manual page including the section,
|
|
|
|
e.g. ``:manpage:`ls(1)```.
|
|
|
|
|
|
|
|
.. describe:: menuselection
|
|
|
|
|
|
|
|
Menu selections should be marked using the ``menuselection`` role. This is
|
|
|
|
used to mark a complete sequence of menu selections, including selecting
|
|
|
|
submenus and choosing a specific operation, or any subsequence of such a
|
|
|
|
sequence. The names of individual selections should be separated by
|
|
|
|
``-->``.
|
|
|
|
|
|
|
|
For example, to mark the selection "Start > Programs", use this markup::
|
|
|
|
|
|
|
|
:menuselection:`Start --> Programs`
|
|
|
|
|
|
|
|
When including a selection that includes some trailing indicator, such as the
|
|
|
|
ellipsis some operating systems use to indicate that the command opens a
|
|
|
|
dialog, the indicator should be omitted from the selection name.
|
|
|
|
|
|
|
|
.. describe:: mimetype
|
|
|
|
|
|
|
|
The name of a MIME type, or a component of a MIME type (the major or minor
|
|
|
|
portion, taken alone).
|
|
|
|
|
|
|
|
.. describe:: newsgroup
|
|
|
|
|
|
|
|
The name of a Usenet newsgroup.
|
|
|
|
|
|
|
|
.. describe:: option
|
|
|
|
|
|
|
|
A command-line option to an executable program. The leading hyphen(s) must
|
|
|
|
be included.
|
|
|
|
|
|
|
|
.. describe:: program
|
|
|
|
|
|
|
|
The name of an executable program. This may differ from the file name for
|
|
|
|
the executable for some platforms. In particular, the ``.exe`` (or other)
|
|
|
|
extension should be omitted for Windows programs.
|
|
|
|
|
|
|
|
.. describe:: regexp
|
|
|
|
|
|
|
|
A regular expression. Quotes should not be included.
|
|
|
|
|
|
|
|
.. describe:: samp
|
|
|
|
|
|
|
|
A piece of literal text, such as code. Within the contents, you can use
|
|
|
|
curly braces to indicate a "variable" part, as in ``:file:``.
|
|
|
|
|
|
|
|
If you don't need the "variable part" indication, use the standard
|
Merged revisions 68133-68134,68141-68142,68145-68146,68148-68149,68159-68162,68166,68171-68174,68179,68195-68196,68210,68214-68215,68217-68222 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68133 | antoine.pitrou | 2009-01-01 16:38:03 +0100 (Thu, 01 Jan 2009) | 1 line
fill in actual issue number in tests
........
r68134 | hirokazu.yamamoto | 2009-01-01 16:45:39 +0100 (Thu, 01 Jan 2009) | 2 lines
Issue #4797: IOError.filename was not set when _fileio.FileIO failed to open
file with `str' filename on Windows.
........
r68141 | benjamin.peterson | 2009-01-01 17:43:12 +0100 (Thu, 01 Jan 2009) | 1 line
fix highlighting
........
r68142 | benjamin.peterson | 2009-01-01 18:29:49 +0100 (Thu, 01 Jan 2009) | 2 lines
welcome to 2009, Python!
........
r68145 | amaury.forgeotdarc | 2009-01-02 01:03:54 +0100 (Fri, 02 Jan 2009) | 5 lines
#4801 _collections module fails to build on cygwin.
_PyObject_GC_TRACK is the macro version of PyObject_GC_Track,
and according to documentation it should not be used for extension modules.
........
r68146 | ronald.oussoren | 2009-01-02 11:44:46 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue4472: "configure --enable-shared doesn't work on OSX"
........
r68148 | ronald.oussoren | 2009-01-02 11:48:31 +0100 (Fri, 02 Jan 2009) | 2 lines
Forgot to add a NEWS item in my previous checkin
........
r68149 | ronald.oussoren | 2009-01-02 11:50:48 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue4780
........
r68159 | ronald.oussoren | 2009-01-02 15:48:17 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue 1627952
........
r68160 | ronald.oussoren | 2009-01-02 15:52:09 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue r1737832
........
r68161 | ronald.oussoren | 2009-01-02 16:00:05 +0100 (Fri, 02 Jan 2009) | 3 lines
Fix for issue 1149804
........
r68162 | ronald.oussoren | 2009-01-02 16:06:00 +0100 (Fri, 02 Jan 2009) | 3 lines
Fix for issue 4472 is incompatible with Cygwin, this patch
should fix that.
........
r68166 | benjamin.peterson | 2009-01-02 19:26:23 +0100 (Fri, 02 Jan 2009) | 1 line
document PyMemberDef
........
r68171 | georg.brandl | 2009-01-02 21:25:14 +0100 (Fri, 02 Jan 2009) | 3 lines
#4811: fix markup glitches (mostly remains of the conversion),
found by Gabriel Genellina.
........
r68172 | martin.v.loewis | 2009-01-02 21:32:55 +0100 (Fri, 02 Jan 2009) | 2 lines
Issue #4075: Use OutputDebugStringW in Py_FatalError.
........
r68173 | martin.v.loewis | 2009-01-02 21:40:14 +0100 (Fri, 02 Jan 2009) | 2 lines
Issue #4051: Prevent conflict of UNICODE macros in cPickle.
........
r68174 | benjamin.peterson | 2009-01-02 21:47:27 +0100 (Fri, 02 Jan 2009) | 1 line
fix compilation on non-Windows platforms
........
r68179 | raymond.hettinger | 2009-01-02 22:26:45 +0100 (Fri, 02 Jan 2009) | 1 line
Issue #4615. Document how to use itertools for de-duping.
........
r68195 | georg.brandl | 2009-01-03 14:45:15 +0100 (Sat, 03 Jan 2009) | 2 lines
Remove useless string literal.
........
r68196 | georg.brandl | 2009-01-03 15:29:53 +0100 (Sat, 03 Jan 2009) | 2 lines
Fix indentation.
........
r68210 | georg.brandl | 2009-01-03 20:10:12 +0100 (Sat, 03 Jan 2009) | 2 lines
Set eol-style correctly for mp_distributing.py.
........
r68214 | georg.brandl | 2009-01-03 20:44:48 +0100 (Sat, 03 Jan 2009) | 2 lines
Make indentation consistent.
........
r68215 | georg.brandl | 2009-01-03 21:15:14 +0100 (Sat, 03 Jan 2009) | 2 lines
Fix role name.
........
r68217 | georg.brandl | 2009-01-03 21:30:15 +0100 (Sat, 03 Jan 2009) | 2 lines
Add rstlint, a little tool to find subtle markup problems and inconsistencies in the Doc sources.
........
r68218 | georg.brandl | 2009-01-03 21:38:59 +0100 (Sat, 03 Jan 2009) | 2 lines
Recognize usage of the default role.
........
r68219 | georg.brandl | 2009-01-03 21:47:01 +0100 (Sat, 03 Jan 2009) | 2 lines
Fix uses of the default role.
........
r68220 | georg.brandl | 2009-01-03 21:55:06 +0100 (Sat, 03 Jan 2009) | 2 lines
Remove trailing whitespace.
........
r68221 | georg.brandl | 2009-01-03 22:04:55 +0100 (Sat, 03 Jan 2009) | 2 lines
Remove tabs from the documentation.
........
r68222 | georg.brandl | 2009-01-03 22:11:58 +0100 (Sat, 03 Jan 2009) | 2 lines
Disable the line length checker by default.
........
2009-01-03 17:55:17 -04:00
|
|
|
````code```` instead.
|
2007-08-15 11:28:01 -03:00
|
|
|
|
|
|
|
.. describe:: var
|
|
|
|
|
|
|
|
A Python or C variable or parameter name.
|
|
|
|
|
|
|
|
|
|
|
|
The following roles generate external links:
|
|
|
|
|
|
|
|
.. describe:: pep
|
|
|
|
|
|
|
|
A reference to a Python Enhancement Proposal. This generates appropriate
|
|
|
|
index entries. The text "PEP *number*\ " is generated; in the HTML output,
|
|
|
|
this text is a hyperlink to an online copy of the specified PEP.
|
|
|
|
|
|
|
|
.. describe:: rfc
|
|
|
|
|
|
|
|
A reference to an Internet Request for Comments. This generates appropriate
|
|
|
|
index entries. The text "RFC *number*\ " is generated; in the HTML output,
|
|
|
|
this text is a hyperlink to an online copy of the specified RFC.
|
|
|
|
|
|
|
|
|
|
|
|
Note that there are no special roles for including hyperlinks as you can use
|
|
|
|
the standard reST markup for that purpose.
|
|
|
|
|
|
|
|
|
|
|
|
.. _doc-ref-role:
|
|
|
|
|
|
|
|
Cross-linking markup
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
To support cross-referencing to arbitrary sections in the documentation, the
|
|
|
|
standard reST labels are "abused" a bit: Every label must precede a section
|
|
|
|
title; and every label name must be unique throughout the entire documentation
|
|
|
|
source.
|
|
|
|
|
|
|
|
You can then reference to these sections using the ``:ref:`label-name``` role.
|
|
|
|
|
|
|
|
Example::
|
|
|
|
|
|
|
|
.. _my-reference-label:
|
|
|
|
|
|
|
|
Section to cross-reference
|
|
|
|
--------------------------
|
|
|
|
|
|
|
|
This is the text of the section.
|
|
|
|
|
|
|
|
It refers to the section itself, see :ref:`my-reference-label`.
|
|
|
|
|
|
|
|
The ``:ref:`` invocation is replaced with the section title.
|
|
|
|
|
|
|
|
|
|
|
|
Paragraph-level markup
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
These directives create short paragraphs and can be used inside information
|
|
|
|
units as well as normal text:
|
|
|
|
|
|
|
|
.. describe:: note
|
|
|
|
|
|
|
|
An especially important bit of information about an API that a user should be
|
|
|
|
aware of when using whatever bit of API the note pertains to. The content of
|
|
|
|
the directive should be written in complete sentences and include all
|
|
|
|
appropriate punctuation.
|
|
|
|
|
|
|
|
Example::
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
This function is not suitable for sending spam e-mails.
|
|
|
|
|
|
|
|
.. describe:: warning
|
|
|
|
|
Merged revisions 72007-72010,72036-72037 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72007 | georg.brandl | 2009-04-27 17:09:25 +0200 (Mo, 27 Apr 2009) | 1 line
#5856: fix typo s in traceback example.
........
r72008 | georg.brandl | 2009-04-27 17:10:44 +0200 (Mo, 27 Apr 2009) | 1 line
Remove ".. warning::" markup that doesnt contain warnings for users, rather todo items.
........
r72009 | georg.brandl | 2009-04-27 17:29:09 +0200 (Mo, 27 Apr 2009) | 3 lines
Demote warnings to notices where appropriate, following the goal that as few "red box" warnings
should clutter the docs as possible. Part 1: stuff that gets merged to Py3k.
........
r72010 | georg.brandl | 2009-04-27 17:29:26 +0200 (Mo, 27 Apr 2009) | 2 lines
Demote warnings to notices, part 2: stuff that is 2.x-only.
........
r72036 | georg.brandl | 2009-04-27 19:04:23 +0200 (Mo, 27 Apr 2009) | 1 line
#5848: small unittest doc patch.
........
r72037 | georg.brandl | 2009-04-27 19:09:53 +0200 (Mo, 27 Apr 2009) | 1 line
#5840: dont claim we dont support TLS.
........
2009-04-28 15:23:28 -03:00
|
|
|
An important bit of information about an API that a user should be aware of
|
|
|
|
when using whatever bit of API the warning pertains to. The content of the
|
|
|
|
directive should be written in complete sentences and include all appropriate
|
Merged revisions 74861-74863,74876,74896,74930,74933,74952-74953,75015,75019,75260-75263,75265-75266,75289 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r74861 | benjamin.peterson | 2009-09-17 05:18:28 +0200 (Do, 17 Sep 2009) | 1 line
pep 8 defaults
........
r74862 | brett.cannon | 2009-09-17 05:24:45 +0200 (Do, 17 Sep 2009) | 1 line
Note in the intro to Extending... that ctypes can be a simpler, more portable solution than custom C code.
........
r74863 | benjamin.peterson | 2009-09-17 05:27:33 +0200 (Do, 17 Sep 2009) | 1 line
rationalize a bit
........
r74876 | georg.brandl | 2009-09-17 18:15:53 +0200 (Do, 17 Sep 2009) | 1 line
#6932: remove paragraph that advises relying on __del__ being called.
........
r74896 | georg.brandl | 2009-09-18 09:22:41 +0200 (Fr, 18 Sep 2009) | 1 line
#6936: for interactive use, quit() is just fine.
........
r74930 | georg.brandl | 2009-09-18 23:21:41 +0200 (Fr, 18 Sep 2009) | 1 line
#6925: rewrite docs for locals() and vars() a bit.
........
r74933 | georg.brandl | 2009-09-18 23:35:59 +0200 (Fr, 18 Sep 2009) | 1 line
#6930: clarify description about byteorder handling in UTF decoder routines.
........
r74952 | georg.brandl | 2009-09-19 12:42:34 +0200 (Sa, 19 Sep 2009) | 1 line
#6946: fix duplicate index entries for datetime classes.
........
r74953 | georg.brandl | 2009-09-19 14:04:16 +0200 (Sa, 19 Sep 2009) | 1 line
Fix references to threading.enumerate().
........
r75015 | georg.brandl | 2009-09-22 12:55:08 +0200 (Di, 22 Sep 2009) | 1 line
Fix encoding name.
........
r75019 | vinay.sajip | 2009-09-22 19:23:41 +0200 (Di, 22 Sep 2009) | 1 line
Fixed a typo, and added sections on optimization and using arbitrary objects as messages.
........
r75260 | andrew.kuchling | 2009-10-05 23:24:20 +0200 (Mo, 05 Okt 2009) | 1 line
Wording fix
........
r75261 | andrew.kuchling | 2009-10-05 23:24:35 +0200 (Mo, 05 Okt 2009) | 1 line
Fix narkup
........
r75262 | andrew.kuchling | 2009-10-05 23:25:03 +0200 (Mo, 05 Okt 2009) | 1 line
Document 'skip' parameter to constructor
........
r75263 | andrew.kuchling | 2009-10-05 23:25:35 +0200 (Mo, 05 Okt 2009) | 1 line
Note side benefit of socket.create_connection()
........
r75265 | andrew.kuchling | 2009-10-06 00:31:11 +0200 (Di, 06 Okt 2009) | 1 line
Reword sentence
........
r75266 | andrew.kuchling | 2009-10-06 00:32:48 +0200 (Di, 06 Okt 2009) | 1 line
Use standard comma punctuation; reword some sentences in the docs
........
r75289 | mark.dickinson | 2009-10-08 22:02:25 +0200 (Do, 08 Okt 2009) | 2 lines
Issue #7051: Clarify behaviour of 'g' and 'G'-style formatting.
........
2009-10-27 11:59:26 -03:00
|
|
|
punctuation. In the interest of not scaring users away from pages filled
|
|
|
|
with warnings, this directive should only be chosen over ``note`` for
|
|
|
|
information regarding the possibility of crashes, data loss, or security
|
|
|
|
implications.
|
2007-08-15 11:28:01 -03:00
|
|
|
|
|
|
|
.. describe:: versionadded
|
|
|
|
|
|
|
|
This directive documents the version of Python which added the described
|
|
|
|
feature to the library or C API. When this applies to an entire module, it
|
|
|
|
should be placed at the top of the module section before any prose.
|
|
|
|
|
|
|
|
The first argument must be given and is the version in question; you can add
|
|
|
|
a second argument consisting of a *brief* explanation of the change.
|
|
|
|
|
|
|
|
Example::
|
|
|
|
|
|
|
|
.. versionadded:: 2.5
|
Merged revisions 68133-68134,68141-68142,68145-68146,68148-68149,68159-68162,68166,68171-68174,68179,68195-68196,68210,68214-68215,68217-68222 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68133 | antoine.pitrou | 2009-01-01 16:38:03 +0100 (Thu, 01 Jan 2009) | 1 line
fill in actual issue number in tests
........
r68134 | hirokazu.yamamoto | 2009-01-01 16:45:39 +0100 (Thu, 01 Jan 2009) | 2 lines
Issue #4797: IOError.filename was not set when _fileio.FileIO failed to open
file with `str' filename on Windows.
........
r68141 | benjamin.peterson | 2009-01-01 17:43:12 +0100 (Thu, 01 Jan 2009) | 1 line
fix highlighting
........
r68142 | benjamin.peterson | 2009-01-01 18:29:49 +0100 (Thu, 01 Jan 2009) | 2 lines
welcome to 2009, Python!
........
r68145 | amaury.forgeotdarc | 2009-01-02 01:03:54 +0100 (Fri, 02 Jan 2009) | 5 lines
#4801 _collections module fails to build on cygwin.
_PyObject_GC_TRACK is the macro version of PyObject_GC_Track,
and according to documentation it should not be used for extension modules.
........
r68146 | ronald.oussoren | 2009-01-02 11:44:46 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue4472: "configure --enable-shared doesn't work on OSX"
........
r68148 | ronald.oussoren | 2009-01-02 11:48:31 +0100 (Fri, 02 Jan 2009) | 2 lines
Forgot to add a NEWS item in my previous checkin
........
r68149 | ronald.oussoren | 2009-01-02 11:50:48 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue4780
........
r68159 | ronald.oussoren | 2009-01-02 15:48:17 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue 1627952
........
r68160 | ronald.oussoren | 2009-01-02 15:52:09 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue r1737832
........
r68161 | ronald.oussoren | 2009-01-02 16:00:05 +0100 (Fri, 02 Jan 2009) | 3 lines
Fix for issue 1149804
........
r68162 | ronald.oussoren | 2009-01-02 16:06:00 +0100 (Fri, 02 Jan 2009) | 3 lines
Fix for issue 4472 is incompatible with Cygwin, this patch
should fix that.
........
r68166 | benjamin.peterson | 2009-01-02 19:26:23 +0100 (Fri, 02 Jan 2009) | 1 line
document PyMemberDef
........
r68171 | georg.brandl | 2009-01-02 21:25:14 +0100 (Fri, 02 Jan 2009) | 3 lines
#4811: fix markup glitches (mostly remains of the conversion),
found by Gabriel Genellina.
........
r68172 | martin.v.loewis | 2009-01-02 21:32:55 +0100 (Fri, 02 Jan 2009) | 2 lines
Issue #4075: Use OutputDebugStringW in Py_FatalError.
........
r68173 | martin.v.loewis | 2009-01-02 21:40:14 +0100 (Fri, 02 Jan 2009) | 2 lines
Issue #4051: Prevent conflict of UNICODE macros in cPickle.
........
r68174 | benjamin.peterson | 2009-01-02 21:47:27 +0100 (Fri, 02 Jan 2009) | 1 line
fix compilation on non-Windows platforms
........
r68179 | raymond.hettinger | 2009-01-02 22:26:45 +0100 (Fri, 02 Jan 2009) | 1 line
Issue #4615. Document how to use itertools for de-duping.
........
r68195 | georg.brandl | 2009-01-03 14:45:15 +0100 (Sat, 03 Jan 2009) | 2 lines
Remove useless string literal.
........
r68196 | georg.brandl | 2009-01-03 15:29:53 +0100 (Sat, 03 Jan 2009) | 2 lines
Fix indentation.
........
r68210 | georg.brandl | 2009-01-03 20:10:12 +0100 (Sat, 03 Jan 2009) | 2 lines
Set eol-style correctly for mp_distributing.py.
........
r68214 | georg.brandl | 2009-01-03 20:44:48 +0100 (Sat, 03 Jan 2009) | 2 lines
Make indentation consistent.
........
r68215 | georg.brandl | 2009-01-03 21:15:14 +0100 (Sat, 03 Jan 2009) | 2 lines
Fix role name.
........
r68217 | georg.brandl | 2009-01-03 21:30:15 +0100 (Sat, 03 Jan 2009) | 2 lines
Add rstlint, a little tool to find subtle markup problems and inconsistencies in the Doc sources.
........
r68218 | georg.brandl | 2009-01-03 21:38:59 +0100 (Sat, 03 Jan 2009) | 2 lines
Recognize usage of the default role.
........
r68219 | georg.brandl | 2009-01-03 21:47:01 +0100 (Sat, 03 Jan 2009) | 2 lines
Fix uses of the default role.
........
r68220 | georg.brandl | 2009-01-03 21:55:06 +0100 (Sat, 03 Jan 2009) | 2 lines
Remove trailing whitespace.
........
r68221 | georg.brandl | 2009-01-03 22:04:55 +0100 (Sat, 03 Jan 2009) | 2 lines
Remove tabs from the documentation.
........
r68222 | georg.brandl | 2009-01-03 22:11:58 +0100 (Sat, 03 Jan 2009) | 2 lines
Disable the line length checker by default.
........
2009-01-03 17:55:17 -04:00
|
|
|
The *spam* parameter.
|
2007-08-15 11:28:01 -03:00
|
|
|
|
|
|
|
Note that there must be no blank line between the directive head and the
|
|
|
|
explanation; this is to make these blocks visually continuous in the markup.
|
|
|
|
|
|
|
|
.. describe:: versionchanged
|
|
|
|
|
|
|
|
Similar to ``versionadded``, but describes when and what changed in the named
|
|
|
|
feature in some way (new parameters, changed side effects, etc.).
|
|
|
|
|
|
|
|
--------------
|
|
|
|
|
|
|
|
.. describe:: seealso
|
|
|
|
|
|
|
|
Many sections include a list of references to module documentation or
|
|
|
|
external documents. These lists are created using the ``seealso`` directive.
|
|
|
|
|
|
|
|
The ``seealso`` directive is typically placed in a section just before any
|
|
|
|
sub-sections. For the HTML output, it is shown boxed off from the main flow
|
|
|
|
of the text.
|
|
|
|
|
|
|
|
The content of the ``seealso`` directive should be a reST definition list.
|
|
|
|
Example::
|
|
|
|
|
|
|
|
.. seealso::
|
|
|
|
|
|
|
|
Module :mod:`zipfile`
|
|
|
|
Documentation of the :mod:`zipfile` standard module.
|
|
|
|
|
|
|
|
`GNU tar manual, Basic Tar Format <http://link>`_
|
|
|
|
Documentation for tar archive files, including GNU tar extensions.
|
|
|
|
|
|
|
|
.. describe:: rubric
|
|
|
|
|
|
|
|
This directive creates a paragraph heading that is not used to create a
|
|
|
|
table of contents node. It is currently used for the "Footnotes" caption.
|
|
|
|
|
|
|
|
.. describe:: centered
|
|
|
|
|
|
|
|
This directive creates a centered boldfaced paragraph. Use it as follows::
|
|
|
|
|
|
|
|
.. centered::
|
|
|
|
|
|
|
|
Paragraph contents.
|
|
|
|
|
|
|
|
|
|
|
|
Table-of-contents markup
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
Since reST does not have facilities to interconnect several documents, or split
|
|
|
|
documents into multiple output files, Sphinx uses a custom directive to add
|
|
|
|
relations between the single files the documentation is made of, as well as
|
|
|
|
tables of contents. The ``toctree`` directive is the central element.
|
|
|
|
|
|
|
|
.. describe:: toctree
|
|
|
|
|
|
|
|
This directive inserts a "TOC tree" at the current location, using the
|
|
|
|
individual TOCs (including "sub-TOC trees") of the files given in the
|
|
|
|
directive body. A numeric ``maxdepth`` option may be given to indicate the
|
|
|
|
depth of the tree; by default, all levels are included.
|
|
|
|
|
|
|
|
Consider this example (taken from the library reference index)::
|
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 2
|
|
|
|
|
|
|
|
intro.rst
|
|
|
|
strings.rst
|
|
|
|
datatypes.rst
|
|
|
|
numeric.rst
|
|
|
|
(many more files listed here)
|
|
|
|
|
|
|
|
This accomplishes two things:
|
|
|
|
|
|
|
|
* Tables of contents from all those files are inserted, with a maximum depth
|
|
|
|
of two, that means one nested heading. ``toctree`` directives in those
|
|
|
|
files are also taken into account.
|
|
|
|
* Sphinx knows that the relative order of the files ``intro.rst``,
|
|
|
|
``strings.rst`` and so forth, and it knows that they are children of the
|
|
|
|
shown file, the library index. From this information it generates "next
|
|
|
|
chapter", "previous chapter" and "parent chapter" links.
|
|
|
|
|
|
|
|
In the end, all files included in the build process must occur in one
|
|
|
|
``toctree`` directive; Sphinx will emit a warning if it finds a file that is
|
|
|
|
not included, because that means that this file will not be reachable through
|
|
|
|
standard navigation.
|
|
|
|
|
|
|
|
The special file ``contents.rst`` at the root of the source directory is the
|
|
|
|
"root" of the TOC tree hierarchy; from it the "Contents" page is generated.
|
|
|
|
|
|
|
|
|
|
|
|
Index-generating markup
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
Sphinx automatically creates index entries from all information units (like
|
|
|
|
functions, classes or attributes) like discussed before.
|
|
|
|
|
|
|
|
However, there is also an explicit directive available, to make the index more
|
|
|
|
comprehensive and enable index entries in documents where information is not
|
|
|
|
mainly contained in information units, such as the language reference.
|
|
|
|
|
|
|
|
The directive is ``index`` and contains one or more index entries. Each entry
|
|
|
|
consists of a type and a value, separated by a colon.
|
|
|
|
|
|
|
|
For example::
|
|
|
|
|
|
|
|
.. index::
|
2007-08-31 05:47:51 -03:00
|
|
|
single: execution; context
|
2007-08-15 11:28:01 -03:00
|
|
|
module: __main__
|
|
|
|
module: sys
|
|
|
|
triple: module; search; path
|
|
|
|
|
|
|
|
This directive contains five entries, which will be converted to entries in the
|
|
|
|
generated index which link to the exact location of the index statement (or, in
|
|
|
|
case of offline media, the corresponding page number).
|
|
|
|
|
|
|
|
The possible entry types are:
|
|
|
|
|
|
|
|
single
|
|
|
|
Creates a single index entry. Can be made a subentry by separating the
|
2007-08-31 05:47:51 -03:00
|
|
|
subentry text with a semicolon (this notation is also used below to describe
|
|
|
|
what entries are created).
|
2007-08-15 11:28:01 -03:00
|
|
|
pair
|
|
|
|
``pair: loop; statement`` is a shortcut that creates two index entries,
|
2007-08-31 05:47:51 -03:00
|
|
|
namely ``loop; statement`` and ``statement; loop``.
|
2007-08-15 11:28:01 -03:00
|
|
|
triple
|
|
|
|
Likewise, ``triple: module; search; path`` is a shortcut that creates three
|
2007-08-31 05:47:51 -03:00
|
|
|
index entries, which are ``module; search path``, ``search; path, module`` and
|
|
|
|
``path; module search``.
|
2007-08-15 11:28:01 -03:00
|
|
|
module, keyword, operator, object, exception, statement, builtin
|
|
|
|
These all create two index entries. For example, ``module: hashlib`` creates
|
2007-08-31 05:47:51 -03:00
|
|
|
the entries ``module; hashlib`` and ``hashlib; module``.
|
2007-08-31 03:59:27 -03:00
|
|
|
|
|
|
|
For index directives containing only "single" entries, there is a shorthand
|
|
|
|
notation::
|
|
|
|
|
|
|
|
.. index:: BNF, grammar, syntax, notation
|
|
|
|
|
|
|
|
This creates four index entries.
|
2007-08-15 11:28:01 -03:00
|
|
|
|
|
|
|
|
|
|
|
Grammar production displays
|
|
|
|
---------------------------
|
|
|
|
|
|
|
|
Special markup is available for displaying the productions of a formal grammar.
|
|
|
|
The markup is simple and does not attempt to model all aspects of BNF (or any
|
|
|
|
derived forms), but provides enough to allow context-free grammars to be
|
|
|
|
displayed in a way that causes uses of a symbol to be rendered as hyperlinks to
|
|
|
|
the definition of the symbol. There is this directive:
|
|
|
|
|
|
|
|
.. describe:: productionlist
|
|
|
|
|
|
|
|
This directive is used to enclose a group of productions. Each production is
|
|
|
|
given on a single line and consists of a name, separated by a colon from the
|
|
|
|
following definition. If the definition spans multiple lines, each
|
|
|
|
continuation line must begin with a colon placed at the same column as in the
|
|
|
|
first line.
|
|
|
|
|
|
|
|
Blank lines are not allowed within ``productionlist`` directive arguments.
|
|
|
|
|
|
|
|
The definition can contain token names which are marked as interpreted text
|
Merged revisions 68133-68134,68141-68142,68145-68146,68148-68149,68159-68162,68166,68171-68174,68179,68195-68196,68210,68214-68215,68217-68222 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68133 | antoine.pitrou | 2009-01-01 16:38:03 +0100 (Thu, 01 Jan 2009) | 1 line
fill in actual issue number in tests
........
r68134 | hirokazu.yamamoto | 2009-01-01 16:45:39 +0100 (Thu, 01 Jan 2009) | 2 lines
Issue #4797: IOError.filename was not set when _fileio.FileIO failed to open
file with `str' filename on Windows.
........
r68141 | benjamin.peterson | 2009-01-01 17:43:12 +0100 (Thu, 01 Jan 2009) | 1 line
fix highlighting
........
r68142 | benjamin.peterson | 2009-01-01 18:29:49 +0100 (Thu, 01 Jan 2009) | 2 lines
welcome to 2009, Python!
........
r68145 | amaury.forgeotdarc | 2009-01-02 01:03:54 +0100 (Fri, 02 Jan 2009) | 5 lines
#4801 _collections module fails to build on cygwin.
_PyObject_GC_TRACK is the macro version of PyObject_GC_Track,
and according to documentation it should not be used for extension modules.
........
r68146 | ronald.oussoren | 2009-01-02 11:44:46 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue4472: "configure --enable-shared doesn't work on OSX"
........
r68148 | ronald.oussoren | 2009-01-02 11:48:31 +0100 (Fri, 02 Jan 2009) | 2 lines
Forgot to add a NEWS item in my previous checkin
........
r68149 | ronald.oussoren | 2009-01-02 11:50:48 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue4780
........
r68159 | ronald.oussoren | 2009-01-02 15:48:17 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue 1627952
........
r68160 | ronald.oussoren | 2009-01-02 15:52:09 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue r1737832
........
r68161 | ronald.oussoren | 2009-01-02 16:00:05 +0100 (Fri, 02 Jan 2009) | 3 lines
Fix for issue 1149804
........
r68162 | ronald.oussoren | 2009-01-02 16:06:00 +0100 (Fri, 02 Jan 2009) | 3 lines
Fix for issue 4472 is incompatible with Cygwin, this patch
should fix that.
........
r68166 | benjamin.peterson | 2009-01-02 19:26:23 +0100 (Fri, 02 Jan 2009) | 1 line
document PyMemberDef
........
r68171 | georg.brandl | 2009-01-02 21:25:14 +0100 (Fri, 02 Jan 2009) | 3 lines
#4811: fix markup glitches (mostly remains of the conversion),
found by Gabriel Genellina.
........
r68172 | martin.v.loewis | 2009-01-02 21:32:55 +0100 (Fri, 02 Jan 2009) | 2 lines
Issue #4075: Use OutputDebugStringW in Py_FatalError.
........
r68173 | martin.v.loewis | 2009-01-02 21:40:14 +0100 (Fri, 02 Jan 2009) | 2 lines
Issue #4051: Prevent conflict of UNICODE macros in cPickle.
........
r68174 | benjamin.peterson | 2009-01-02 21:47:27 +0100 (Fri, 02 Jan 2009) | 1 line
fix compilation on non-Windows platforms
........
r68179 | raymond.hettinger | 2009-01-02 22:26:45 +0100 (Fri, 02 Jan 2009) | 1 line
Issue #4615. Document how to use itertools for de-duping.
........
r68195 | georg.brandl | 2009-01-03 14:45:15 +0100 (Sat, 03 Jan 2009) | 2 lines
Remove useless string literal.
........
r68196 | georg.brandl | 2009-01-03 15:29:53 +0100 (Sat, 03 Jan 2009) | 2 lines
Fix indentation.
........
r68210 | georg.brandl | 2009-01-03 20:10:12 +0100 (Sat, 03 Jan 2009) | 2 lines
Set eol-style correctly for mp_distributing.py.
........
r68214 | georg.brandl | 2009-01-03 20:44:48 +0100 (Sat, 03 Jan 2009) | 2 lines
Make indentation consistent.
........
r68215 | georg.brandl | 2009-01-03 21:15:14 +0100 (Sat, 03 Jan 2009) | 2 lines
Fix role name.
........
r68217 | georg.brandl | 2009-01-03 21:30:15 +0100 (Sat, 03 Jan 2009) | 2 lines
Add rstlint, a little tool to find subtle markup problems and inconsistencies in the Doc sources.
........
r68218 | georg.brandl | 2009-01-03 21:38:59 +0100 (Sat, 03 Jan 2009) | 2 lines
Recognize usage of the default role.
........
r68219 | georg.brandl | 2009-01-03 21:47:01 +0100 (Sat, 03 Jan 2009) | 2 lines
Fix uses of the default role.
........
r68220 | georg.brandl | 2009-01-03 21:55:06 +0100 (Sat, 03 Jan 2009) | 2 lines
Remove trailing whitespace.
........
r68221 | georg.brandl | 2009-01-03 22:04:55 +0100 (Sat, 03 Jan 2009) | 2 lines
Remove tabs from the documentation.
........
r68222 | georg.brandl | 2009-01-03 22:11:58 +0100 (Sat, 03 Jan 2009) | 2 lines
Disable the line length checker by default.
........
2009-01-03 17:55:17 -04:00
|
|
|
(e.g. ``unaryneg ::= "-" `integer```) -- this generates cross-references
|
2007-08-15 11:28:01 -03:00
|
|
|
to the productions of these tokens.
|
|
|
|
|
|
|
|
Note that no further reST parsing is done in the production, so that you
|
|
|
|
don't have to escape ``*`` or ``|`` characters.
|
|
|
|
|
|
|
|
|
Merged revisions 68133-68134,68141-68142,68145-68146,68148-68149,68159-68162,68166,68171-68174,68179,68195-68196,68210,68214-68215,68217-68222 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68133 | antoine.pitrou | 2009-01-01 16:38:03 +0100 (Thu, 01 Jan 2009) | 1 line
fill in actual issue number in tests
........
r68134 | hirokazu.yamamoto | 2009-01-01 16:45:39 +0100 (Thu, 01 Jan 2009) | 2 lines
Issue #4797: IOError.filename was not set when _fileio.FileIO failed to open
file with `str' filename on Windows.
........
r68141 | benjamin.peterson | 2009-01-01 17:43:12 +0100 (Thu, 01 Jan 2009) | 1 line
fix highlighting
........
r68142 | benjamin.peterson | 2009-01-01 18:29:49 +0100 (Thu, 01 Jan 2009) | 2 lines
welcome to 2009, Python!
........
r68145 | amaury.forgeotdarc | 2009-01-02 01:03:54 +0100 (Fri, 02 Jan 2009) | 5 lines
#4801 _collections module fails to build on cygwin.
_PyObject_GC_TRACK is the macro version of PyObject_GC_Track,
and according to documentation it should not be used for extension modules.
........
r68146 | ronald.oussoren | 2009-01-02 11:44:46 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue4472: "configure --enable-shared doesn't work on OSX"
........
r68148 | ronald.oussoren | 2009-01-02 11:48:31 +0100 (Fri, 02 Jan 2009) | 2 lines
Forgot to add a NEWS item in my previous checkin
........
r68149 | ronald.oussoren | 2009-01-02 11:50:48 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue4780
........
r68159 | ronald.oussoren | 2009-01-02 15:48:17 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue 1627952
........
r68160 | ronald.oussoren | 2009-01-02 15:52:09 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue r1737832
........
r68161 | ronald.oussoren | 2009-01-02 16:00:05 +0100 (Fri, 02 Jan 2009) | 3 lines
Fix for issue 1149804
........
r68162 | ronald.oussoren | 2009-01-02 16:06:00 +0100 (Fri, 02 Jan 2009) | 3 lines
Fix for issue 4472 is incompatible with Cygwin, this patch
should fix that.
........
r68166 | benjamin.peterson | 2009-01-02 19:26:23 +0100 (Fri, 02 Jan 2009) | 1 line
document PyMemberDef
........
r68171 | georg.brandl | 2009-01-02 21:25:14 +0100 (Fri, 02 Jan 2009) | 3 lines
#4811: fix markup glitches (mostly remains of the conversion),
found by Gabriel Genellina.
........
r68172 | martin.v.loewis | 2009-01-02 21:32:55 +0100 (Fri, 02 Jan 2009) | 2 lines
Issue #4075: Use OutputDebugStringW in Py_FatalError.
........
r68173 | martin.v.loewis | 2009-01-02 21:40:14 +0100 (Fri, 02 Jan 2009) | 2 lines
Issue #4051: Prevent conflict of UNICODE macros in cPickle.
........
r68174 | benjamin.peterson | 2009-01-02 21:47:27 +0100 (Fri, 02 Jan 2009) | 1 line
fix compilation on non-Windows platforms
........
r68179 | raymond.hettinger | 2009-01-02 22:26:45 +0100 (Fri, 02 Jan 2009) | 1 line
Issue #4615. Document how to use itertools for de-duping.
........
r68195 | georg.brandl | 2009-01-03 14:45:15 +0100 (Sat, 03 Jan 2009) | 2 lines
Remove useless string literal.
........
r68196 | georg.brandl | 2009-01-03 15:29:53 +0100 (Sat, 03 Jan 2009) | 2 lines
Fix indentation.
........
r68210 | georg.brandl | 2009-01-03 20:10:12 +0100 (Sat, 03 Jan 2009) | 2 lines
Set eol-style correctly for mp_distributing.py.
........
r68214 | georg.brandl | 2009-01-03 20:44:48 +0100 (Sat, 03 Jan 2009) | 2 lines
Make indentation consistent.
........
r68215 | georg.brandl | 2009-01-03 21:15:14 +0100 (Sat, 03 Jan 2009) | 2 lines
Fix role name.
........
r68217 | georg.brandl | 2009-01-03 21:30:15 +0100 (Sat, 03 Jan 2009) | 2 lines
Add rstlint, a little tool to find subtle markup problems and inconsistencies in the Doc sources.
........
r68218 | georg.brandl | 2009-01-03 21:38:59 +0100 (Sat, 03 Jan 2009) | 2 lines
Recognize usage of the default role.
........
r68219 | georg.brandl | 2009-01-03 21:47:01 +0100 (Sat, 03 Jan 2009) | 2 lines
Fix uses of the default role.
........
r68220 | georg.brandl | 2009-01-03 21:55:06 +0100 (Sat, 03 Jan 2009) | 2 lines
Remove trailing whitespace.
........
r68221 | georg.brandl | 2009-01-03 22:04:55 +0100 (Sat, 03 Jan 2009) | 2 lines
Remove tabs from the documentation.
........
r68222 | georg.brandl | 2009-01-03 22:11:58 +0100 (Sat, 03 Jan 2009) | 2 lines
Disable the line length checker by default.
........
2009-01-03 17:55:17 -04:00
|
|
|
.. XXX describe optional first parameter
|
2007-08-15 11:28:01 -03:00
|
|
|
|
|
|
|
The following is an example taken from the Python Reference Manual::
|
|
|
|
|
|
|
|
.. productionlist::
|
|
|
|
try_stmt: try1_stmt | try2_stmt
|
|
|
|
try1_stmt: "try" ":" `suite`
|
|
|
|
: ("except" [`expression` ["," `target`]] ":" `suite`)+
|
|
|
|
: ["else" ":" `suite`]
|
|
|
|
: ["finally" ":" `suite`]
|
|
|
|
try2_stmt: "try" ":" `suite`
|
|
|
|
: "finally" ":" `suite`
|
|
|
|
|
|
|
|
|
|
|
|
Substitutions
|
|
|
|
-------------
|
|
|
|
|
|
|
|
The documentation system provides three substitutions that are defined by default.
|
Merged revisions 67154,67157-67159,67162-67163,67166,67175-67176,67189,67224-67225,67243 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r67154 | hirokazu.yamamoto | 2008-11-08 04:46:17 +0100 (Sat, 08 Nov 2008) | 1 line
Issue #4071: ntpath.abspath returned an empty string for long unicode path.
........
r67157 | georg.brandl | 2008-11-08 12:47:44 +0100 (Sat, 08 Nov 2008) | 2 lines
Don't use "HOWTO" as the title for all howto .tex files.
........
r67158 | georg.brandl | 2008-11-08 12:48:20 +0100 (Sat, 08 Nov 2008) | 2 lines
Update "Documenting" a bit. Concentrate on Python-specifics.
........
r67159 | georg.brandl | 2008-11-08 13:52:25 +0100 (Sat, 08 Nov 2008) | 2 lines
Fix warning.
........
r67162 | benjamin.peterson | 2008-11-08 17:55:33 +0100 (Sat, 08 Nov 2008) | 1 line
a few compile() and ast doc improvements
........
r67163 | benjamin.peterson | 2008-11-08 18:04:18 +0100 (Sat, 08 Nov 2008) | 1 line
move context clue to versionchanged tag
........
r67166 | benjamin.peterson | 2008-11-08 18:07:06 +0100 (Sat, 08 Nov 2008) | 1 line
clarify what was added
........
r67175 | benjamin.peterson | 2008-11-09 02:44:32 +0100 (Sun, 09 Nov 2008) | 1 line
update link
........
r67176 | benjamin.peterson | 2008-11-09 02:52:32 +0100 (Sun, 09 Nov 2008) | 1 line
fix comment
........
r67189 | benjamin.peterson | 2008-11-11 22:56:06 +0100 (Tue, 11 Nov 2008) | 1 line
use correct name
........
r67224 | georg.brandl | 2008-11-15 09:10:04 +0100 (Sat, 15 Nov 2008) | 2 lines
#4324: fix getlocale() argument.
........
r67225 | brett.cannon | 2008-11-15 23:33:25 +0100 (Sat, 15 Nov 2008) | 1 line
Clarify the docs for the 'strict' argument to httplib.HTTPConnection.
........
r67243 | benjamin.peterson | 2008-11-17 22:39:05 +0100 (Mon, 17 Nov 2008) | 1 line
a few fixes on the download page
........
2008-12-05 04:35:09 -04:00
|
|
|
They are set in the build configuration file :file:`conf.py`.
|
2007-08-15 11:28:01 -03:00
|
|
|
|
|
|
|
.. describe:: |release|
|
|
|
|
|
|
|
|
Replaced by the Python release the documentation refers to. This is the full
|
|
|
|
version string including alpha/beta/release candidate tags, e.g. ``2.5.2b3``.
|
|
|
|
|
|
|
|
.. describe:: |version|
|
|
|
|
|
|
|
|
Replaced by the Python version the documentation refers to. This consists
|
|
|
|
only of the major and minor version parts, e.g. ``2.5``, even for version
|
|
|
|
2.5.1.
|
|
|
|
|
|
|
|
.. describe:: |today|
|
|
|
|
|
|
|
|
Replaced by either today's date, or the date set in the build configuration
|
|
|
|
file. Normally has the format ``April 14, 2007``.
|
|
|
|
|
|
|
|
|
|
|
|
.. rubric:: Footnotes
|
|
|
|
|
|
|
|
.. [1] There is a standard ``.. include`` directive, but it raises errors if the
|
|
|
|
file is not found. This one only emits a warning.
|