Skip to content

Commit b6c1db9

Browse files
gh-143089: Fix ParamSpec default examples to use list instead of tuple
1 parent ea3fd78 commit b6c1db9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/typevarobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,13 +1451,13 @@ The following syntax creates a parameter specification that defaults\n\
14511451
to a callable accepting two positional-only arguments of types int\n\
14521452
and str:\n\
14531453
\n\
1454-
type IntFuncDefault[**P = (int, str)] = Callable[P, int]\n\
1454+
type IntFuncDefault[**P = [int, str]] = Callable[P, int]\n\
14551455
\n\
14561456
For compatibility with Python 3.11 and earlier, ParamSpec objects\n\
14571457
can also be created as follows::\n\
14581458
\n\
14591459
P = ParamSpec('P')\n\
1460-
DefaultP = ParamSpec('DefaultP', default=(int, str))\n\
1460+
DefaultP = ParamSpec('DefaultP', default=[int, str])\n\
14611461
\n\
14621462
Parameter specification variables exist primarily for the benefit of\n\
14631463
static type checkers. They are used to forward the parameter types of\n\

0 commit comments

Comments
 (0)