From: Steve C Date: Sun, 15 Dec 2024 12:28:43 +0000 (-0500) Subject: Clarify ast docs to use a less confusing example for `ast.ParamSpec` (#127955) X-Git-Tag: v3.14.0a3~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7900a85019457c14e8c6abac532846bc9f26760d;p=thirdparty%2FPython%2Fcpython.git Clarify ast docs to use a less confusing example for `ast.ParamSpec` (#127955) Fix typo in ast docs: ParamSpec defaults --- diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index 22d8c87cb58e..fd901e232855 100644 --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -1807,7 +1807,7 @@ aliases. .. doctest:: - >>> print(ast.dump(ast.parse("type Alias[**P = (int, str)] = Callable[P, int]"), indent=4)) + >>> print(ast.dump(ast.parse("type Alias[**P = [int, str]] = Callable[P, int]"), indent=4)) Module( body=[ TypeAlias( @@ -1815,7 +1815,7 @@ aliases. type_params=[ ParamSpec( name='P', - default_value=Tuple( + default_value=List( elts=[ Name(id='int', ctx=Load()), Name(id='str', ctx=Load())],