[Python-checkins] [3.11] gh-104984: remove kwargs and starargs from Call & ClassDef (GH-104986) (#104988)
AlexWaygood
webhook-mailer at python.org
Fri May 26 13:14:10 EDT 2023
https://github.com/python/cpython/commit/a6326972253bf5282c5bf422f4a16d93ace77b57
commit: a6326972253bf5282c5bf422f4a16d93ace77b57
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: AlexWaygood <Alex.Waygood at Gmail.com>
date: 2023-05-26T18:14:03+01:00
summary:
[3.11] gh-104984: remove kwargs and starargs from Call & ClassDef (GH-104986) (#104988)
gh-104984: remove kwargs and starargs from Call & ClassDef (GH-104986)
These fields are removed in https://github.com/python/cpython/commit/025e9ebd0a0a19f50ca83af6ada0ac65be1fa2a1
(cherry picked from commit 61c1d6760facbc172a58512cad46148f587b4da1)
Co-authored-by: Shaygan Hooshyari <sh.hooshyari at gmail.com>
files:
M Doc/library/ast.rst
diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst
index 3ed2c4fa7370..c92826621ff5 100644
--- a/Doc/library/ast.rst
+++ b/Doc/library/ast.rst
@@ -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:
@@ -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::
@@ -1818,7 +1818,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.
@@ -1827,9 +1827,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`.
More information about the Python-checkins
mailing list