Clarify ast docs to use a less confusing example for `ast.ParamSpec` (GH-127955)
Fix typo in ast docs: ParamSpec defaults
(cherry picked from commit
7900a85019457c14e8c6abac532846bc9f26760d)
Co-authored-by: Steve C <diceroll123@gmail.com>
.. 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(
type_params=[
ParamSpec(
name='P',
- default_value=Tuple(
+ default_value=List(
elts=[
Name(id='int', ctx=Load()),
Name(id='str', ctx=Load())],