mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
More tweaks to the py domain docs.
This commit is contained in:
parent
1723a09d72
commit
dbd544d12b
@ -157,17 +157,6 @@ declarations:
|
|||||||
|
|
||||||
The following directives are provided for module and class contents:
|
The following directives are provided for module and class contents:
|
||||||
|
|
||||||
.. rst:directive:: .. py:data:: name
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
.. rst:directive:: .. py:exception:: name
|
|
||||||
|
|
||||||
Describes an exception class. The signature can, but need not include
|
|
||||||
parentheses with constructor arguments.
|
|
||||||
|
|
||||||
.. rst:directive:: .. py:function:: name(parameters)
|
.. rst:directive:: .. py:function:: name(parameters)
|
||||||
|
|
||||||
Describes a module-level function. The signature should include the
|
Describes a module-level function. The signature should include the
|
||||||
@ -178,11 +167,23 @@ The following directives are provided for module and class contents:
|
|||||||
|
|
||||||
For methods you should use :rst:dir:`py:method`.
|
For methods you should use :rst:dir:`py:method`.
|
||||||
|
|
||||||
The description should include information about the parameters required and
|
The description normally includes information about the parameters required
|
||||||
how they are used (especially whether mutable objects passed as parameters
|
and how they are used (especially whether mutable objects passed as
|
||||||
are modified), side effects, and possible exceptions. This information can
|
parameters are modified), side effects, and possible exceptions.
|
||||||
optionally be given in a structured form, see :ref:`info-field-lists`. A
|
|
||||||
small example may be provided.
|
This information can (in any ``py`` directive) optionally be given in a
|
||||||
|
structured form, see :ref:`info-field-lists`.
|
||||||
|
|
||||||
|
.. rst:directive:: .. py:data:: name
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
.. rst:directive:: .. py:exception:: name
|
||||||
|
|
||||||
|
Describes an exception class. The signature can, but need not include
|
||||||
|
parentheses with constructor arguments.
|
||||||
|
|
||||||
.. rst:directive:: .. py:class:: name
|
.. rst:directive:: .. py:class:: name
|
||||||
.. py:class:: name(parameters)
|
.. py:class:: name(parameters)
|
||||||
|
Loading…
Reference in New Issue
Block a user