]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-143089: Fix ParamSpec default examples to use list instead of tuple (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 8 Jan 2026 11:49:43 +0000 (12:49 +0100)
committerGitHub <noreply@github.com>
Thu, 8 Jan 2026 11:49:43 +0000 (11:49 +0000)
Co-authored-by: VanshAgarwal24036 <148854295+VanshAgarwal24036@users.noreply.github.com>
Objects/typevarobject.c

index fa6c8d7367d84e4e6a0f2c0d6677b22422e6a21d..1398f911e54ef5cc9f40373aeb4d673ba80e92ef 100644 (file)
@@ -1175,13 +1175,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\