Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions peps/pep-0846.rst
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,10 @@ For the opening example, the reference implementation displays:

See help(typing.TypeAliasType) for the full type alias interface.

This PEP does not add automatic discovery of type alias docstrings to
:py:mod:`doctest`. Supporting this would require a separate change to its
discovery rules.
:py:mod:`doctest` discovers type alias docstrings in modules and classes,
and accepts type alias objects in a module's ``__test__`` dictionary.
As with functions and classes, aliases imported from other modules are
excluded from automatic discovery. Discovery does not evaluate alias values.


Rationale
Expand Down Expand Up @@ -306,6 +307,7 @@ A CPython prototype is available at these revisions:

* `Compiler, runtime, and AST support <Compiler_>`_.
* `pydoc support <Pydoc_>`_.
* `doctest discovery <Doctest_>`_.

The grammar rule for the :py:keyword:`type` statement gains an optional
group that parses the expression statement on the following logical line.
Expand Down Expand Up @@ -395,3 +397,4 @@ CC0-1.0-Universal license, whichever is more permissive.
.. _Issue: https://github.com/python/cpython/issues/156925
.. _Compiler: https://github.com/johnslavik/cpython/commit/a807d9bd68eaf2243b4869a4c2213c705ec18206
.. _Pydoc: https://github.com/johnslavik/cpython/commit/67f572e4cadc0eeef9f1d8cbd22404622ccc2c92
.. _Doctest: https://github.com/johnslavik/cpython/commit/25044689382307876f310c23fd94e5662aab22b1
Loading