Skip to content

Commit

Permalink
PEP 12 examples
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood committed Jun 6, 2024
1 parent 4aa7a86 commit 172dc56
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions peps/pep-0012.rst
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,21 @@ which renders as:

.. canonical-pypa-spec:: :ref:`packaging:core-metadata`

For a typing PEP that introduces no new runtime objects,
you might use something like the first one of these;
for a typing PEP that introduces a new object to the typing module at runtime,
you might use the second::

.. canonical-typing-spec:: :ref:`typing:packaging-typed-libraries`
.. canonical-typing-spec:: :ref:`typing:literal-types` and
:py:data:`typing.Literal`

The two render as:

.. canonical-typing-spec:: :ref:`typing:packaging-typed-libraries`
.. canonical-typing-spec:: :ref:`typing:literal-types` and
:py:data:`typing.Literal`

The argument accepts arbitrary reST,
so you can include multiple linked docs/specs and name them whatever you like,
and you can also include directive content that will be inserted into the text.
Expand Down

0 comments on commit 172dc56

Please sign in to comment.