Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-118181: Fix parameter markup in AST docs #124473

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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 26, 2024
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
Fix attribute markup in AST docs
  • Loading branch information
tomasr8 committed Sep 26, 2024
commit e7d2905b88fe3b33ad4de03d68459ebcec2ce36f
26 changes: 13 additions & 13 deletions 26 Doc/library/ast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ Root nodes
A Python module, as with :ref:`file input <file-input>`.
Node type generated by :func:`ast.parse` in the default ``"exec"`` *mode*.

*body* is a :class:`list` of the module's :ref:`ast-statements`.
``body`` is a :class:`list` of the module's :ref:`ast-statements`.

*type_ignores* is a :class:`list` of the module's type ignore comments;
``type_ignores`` is a :class:`list` of the module's type ignore comments;
see :func:`ast.parse` for more details.

.. doctest::
Expand All @@ -199,7 +199,7 @@ Root nodes
A single Python :ref:`expression input <expression-input>`.
Node type generated by :func:`ast.parse` when *mode* is ``"eval"``.

*body* is a single node,
``body`` is a single node,
one of the :ref:`expression types <ast-expressions>`.

.. doctest::
Expand All @@ -214,7 +214,7 @@ Root nodes
A single :ref:`interactive input <interactive>`, like in :ref:`tut-interac`.
Node type generated by :func:`ast.parse` when *mode* is ``"single"``.

*body* is a :class:`list` of :ref:`statement nodes <ast-statements>`.
``body`` is a :class:`list` of :ref:`statement nodes <ast-statements>`.

.. doctest::

Expand Down Expand Up @@ -243,9 +243,9 @@ Root nodes
# type: (int, int) -> int
return a + b

*argtypes* is a :class:`list` of :ref:`expression nodes <ast-expressions>`.
``argtypes`` is a :class:`list` of :ref:`expression nodes <ast-expressions>`.

*returns* is a single :ref:`expression node <ast-expressions>`.
``returns`` is a single :ref:`expression node <ast-expressions>`.

.. doctest::

Expand Down Expand Up @@ -1771,9 +1771,9 @@ aliases.

.. class:: TypeVar(name, bound, default_value)

A :class:`typing.TypeVar`. *name* is the name of the type variable.
*bound* is the bound or constraints, if any. If *bound* is a :class:`Tuple`,
it represents constraints; otherwise it represents the bound. *default_value*
A :class:`typing.TypeVar`. ``name`` is the name of the type variable.
``bound`` is the bound or constraints, if any. If ``bound`` is a :class:`Tuple`,
it represents constraints; otherwise it represents the bound. ``default_value``
is the default value; if the :class:`!TypeVar` has no default, this
attribute will be set to ``None``.

Expand Down Expand Up @@ -1801,8 +1801,8 @@ aliases.

.. class:: ParamSpec(name, default_value)

A :class:`typing.ParamSpec`. *name* is the name of the parameter specification.
*default_value* is the default value; if the :class:`!ParamSpec` has no default,
A :class:`typing.ParamSpec`. ``name`` is the name of the parameter specification.
``default_value`` is the default value; if the :class:`!ParamSpec` has no default,
this attribute will be set to ``None``.

.. doctest::
Expand Down Expand Up @@ -1836,8 +1836,8 @@ aliases.

.. class:: TypeVarTuple(name, default_value)

A :class:`typing.TypeVarTuple`. *name* is the name of the type variable tuple.
*default_value* is the default value; if the :class:`!TypeVarTuple` has no
A :class:`typing.TypeVarTuple`. ``name`` is the name of the type variable tuple.
``default_value`` is the default value; if the :class:`!TypeVarTuple` has no
default, this attribute will be set to ``None``.

.. doctest::
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.