mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
[3.13] Clarify ast docs to use a less confusing example for ast.ParamSpec (GH-127955) (#127959)
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 7900a85019)
Co-authored-by: Steve C <diceroll123@gmail.com>
This commit is contained in:
parent
90ae4b6f5a
commit
89f4b23f9e
1 changed files with 2 additions and 2 deletions
|
|
@ -1802,7 +1802,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(
|
||||
|
|
@ -1810,7 +1810,7 @@ aliases.
|
|||
type_params=[
|
||||
ParamSpec(
|
||||
name='P',
|
||||
default_value=Tuple(
|
||||
default_value=List(
|
||||
elts=[
|
||||
Name(id='int', ctx=Load()),
|
||||
Name(id='str', ctx=Load())],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue