]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-143089: Fix ParamSpec default examples to use list instead of tuple (#143179)
authorVanshAgarwal24036 <148854295+VanshAgarwal24036@users.noreply.github.com>
Thu, 8 Jan 2026 03:32:44 +0000 (09:02 +0530)
committerGitHub <noreply@github.com>
Thu, 8 Jan 2026 03:32:44 +0000 (19:32 -0800)
Objects/typevarobject.c

index 8e43962c7e37f4c155c6fe111da721634af06939..2ec546aff52c0a2c95df435724c953f16f7c7fe3 100644 (file)
@@ -1451,13 +1451,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\