mirror of
https://github.com/python/cpython.git
synced 2026-04-14 07:41:00 +00:00
[3.14] gh-143089: Fix ParamSpec default examples to use list instead of tuple (GH-143179) (#143538)
Co-authored-by: VanshAgarwal24036 <148854295+VanshAgarwal24036@users.noreply.github.com>
This commit is contained in:
parent
e8ac4271b1
commit
de53bf4168
1 changed files with 2 additions and 2 deletions
|
|
@ -1450,13 +1450,13 @@ The following syntax creates a parameter specification that defaults\n\
|
|||
to a callable accepting two positional-only arguments of types int\n\
|
||||
and str:\n\
|
||||
\n\
|
||||
type IntFuncDefault[**P = (int, str)] = Callable[P, int]\n\
|
||||
type IntFuncDefault[**P = [int, str]] = Callable[P, int]\n\
|
||||
\n\
|
||||
For compatibility with Python 3.11 and earlier, ParamSpec objects\n\
|
||||
can also be created as follows::\n\
|
||||
\n\
|
||||
P = ParamSpec('P')\n\
|
||||
DefaultP = ParamSpec('DefaultP', default=(int, str))\n\
|
||||
DefaultP = ParamSpec('DefaultP', default=[int, str])\n\
|
||||
\n\
|
||||
Parameter specification variables exist primarily for the benefit of\n\
|
||||
static type checkers. They are used to forward the parameter types of\n\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue