@@ -1744,17 +1744,17 @@ aliases.
1744
1744
Function and class definitions
1745
1745
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1746
1746
1747
- .. class :: FunctionDef(name, type_params, args, body, decorator_list, returns, type_comment)
1747
+ .. class :: FunctionDef(name, args, body, decorator_list, returns, type_comment, type_params )
1748
1748
1749
1749
A function definition.
1750
1750
1751
1751
* ``name `` is a raw string of the function name.
1752
- * ``type_params `` is a list of :ref: `type parameters <ast-type-params >`.
1753
1752
* ``args `` is an :class: `arguments ` node.
1754
1753
* ``body `` is the list of nodes inside the function.
1755
1754
* ``decorator_list `` is the list of decorators to be applied, stored outermost
1756
1755
first (i.e. the first in the list will be applied last).
1757
1756
* ``returns `` is the return annotation.
1757
+ * ``type_params `` is a list of :ref: `type parameters <ast-type-params >`.
1758
1758
1759
1759
.. attribute :: type_comment
1760
1760
@@ -1917,19 +1917,19 @@ Function and class definitions
1917
1917
type_ignores=[])
1918
1918
1919
1919
1920
- .. class :: ClassDef(name, type_params, bases, keywords, body, decorator_list)
1920
+ .. class :: ClassDef(name, bases, keywords, body, decorator_list, type_params )
1921
1921
1922
1922
A class definition.
1923
1923
1924
1924
* ``name `` is a raw string for the class name
1925
- * ``type_params `` is a list of :ref: `type parameters <ast-type-params >`.
1926
1925
* ``bases `` is a list of nodes for explicitly specified base classes.
1927
1926
* ``keywords `` is a list of :class: `keyword ` nodes, principally for 'metaclass'.
1928
1927
Other keywords will be passed to the metaclass, as per `PEP-3115
1929
1928
<https://peps.python.org/pep-3115/> `_.
1930
1929
* ``body `` is a list of nodes representing the code within the class
1931
1930
definition.
1932
1931
* ``decorator_list `` is a list of nodes, as in :class: `FunctionDef `.
1932
+ * ``type_params `` is a list of :ref: `type parameters <ast-type-params >`.
1933
1933
1934
1934
.. doctest ::
1935
1935
@@ -1961,7 +1961,7 @@ Function and class definitions
1961
1961
Async and await
1962
1962
^^^^^^^^^^^^^^^
1963
1963
1964
- .. class :: AsyncFunctionDef(name, args, body, decorator_list, returns, type_comment)
1964
+ .. class :: AsyncFunctionDef(name, args, body, decorator_list, returns, type_comment, type_params )
1965
1965
1966
1966
An ``async def `` function definition. Has the same fields as
1967
1967
:class: `FunctionDef `.
0 commit comments