Skip to content

Commit

Permalink
[3.12] pythongh-104984: remove kwargs and starargs from Call & ClassD…
Browse files Browse the repository at this point in the history
…ef (pythonGH-104986) (python#104987)

pythongh-104984: remove kwargs and starargs from Call & ClassDef (pythonGH-104986)

These fields are removed in python@025e9eb
(cherry picked from commit 61c1d67)

Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>
  • Loading branch information
miss-islington and Glyphack committed May 26, 2023
1 parent 97509ca commit bb1e57e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Doc/library/ast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ Expressions
Comparison operator tokens.


.. class:: Call(func, args, keywords, starargs, kwargs)
.. class:: Call(func, args, keywords)

A function call. ``func`` is the function, which will often be a
:class:`Name` or :class:`Attribute` object. Of the arguments:
Expand All @@ -491,7 +491,7 @@ Expressions
arguments passed by keyword.

When creating a ``Call`` node, ``args`` and ``keywords`` are required, but
they can be empty lists. ``starargs`` and ``kwargs`` are optional.
they can be empty lists.

.. doctest::

Expand Down Expand Up @@ -1820,7 +1820,7 @@ Function and class definitions
type_ignores=[])


.. class:: ClassDef(name, bases, keywords, starargs, kwargs, body, decorator_list)
.. class:: ClassDef(name, bases, keywords, body, decorator_list)

A class definition.

Expand All @@ -1829,9 +1829,6 @@ Function and class definitions
* ``keywords`` is a list of :class:`keyword` nodes, principally for 'metaclass'.
Other keywords will be passed to the metaclass, as per `PEP-3115
<https://peps.python.org/pep-3115/>`_.
* ``starargs`` and ``kwargs`` are each a single node, as in a function call.
starargs will be expanded to join the list of base classes, and kwargs will
be passed to the metaclass.
* ``body`` is a list of nodes representing the code within the class
definition.
* ``decorator_list`` is a list of nodes, as in :class:`FunctionDef`.
Expand Down

0 comments on commit bb1e57e

Please sign in to comment.