10000 gh-101100: Consolidate documentation on `ModuleType` attributes by AlexWaygood · Pull Request #124709 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-101100: Consolidate documentation on ModuleType attributes #124709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Oct 9, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
get rid of the table in the middle; describe all docs at the top level
  • Loading branch information
AlexWaygood committed Sep 29, 2024
commit 250d17aced22ca3666f020893d4ff4528ae3f288
35 changes: 15 additions & 20 deletions Doc/reference/datamodel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1086,32 +1086,27 @@ Other writable attributes on module objects
As well as the import-related attributes listed above, module objects also have
the following writable attributes:

.. list-table::
:header-rows: 1
.. attribute:: module.__doc__

* - Attribute
- Meaning
The module's documentation string, or ``None`` if unavailable.
See also: :attr:`__doc__ attributes <definition.__doc__>`.

* - .. attribute:: module.__doc__
- The module's documentation string, or ``None`` if unavailable.
See also: :attr:`__doc__ attributes <definition.__doc__>`.
.. attribute:: module.__annotations__

* - .. attribute:: module.__annotations__
- A dictionary containing
:term:`variable annotations <variable annotation>` collected during
module body execution. For best practices on working with
:attr:`!__annotations__`, see :mod:`annotationlib`.
A dictionary containing :term:`variable annotations <variable annotation>`
collected during module body execution. For best practices on working with
:attr:`!__annotations__`, see :mod:`annotationlib`.

.. versionchanged:: 3.14
Annotations are now :ref:`lazily evaluated <lazy-evaluation>`.
See :pep:`649`.
.. versionchanged:: 3.14
Annotations are now :ref:`lazily evaluated <lazy-evaluation>`.
See :pep:`649`.

* - .. attribute:: module.__annotate__
- The :term:`annotate function` for this module, or ``None`` if the module
has no annotations. See also:
:attr:`__annotate__ attributes <object.__annotate__>`.
.. attribute:: module.__annotate__

.. versionadded:: 3.14
The :term:`annotate function` for this module, or ``None`` if the module has
no annotations. See also: :attr:`__annotate__ attributes <object.__annotate__>`.

.. versionadded:: 3.14

Module dictionaries
^^^^^^^^^^^^^^^^^^^
Expand Down
Loading
0