From 439a61822506fe4252b3360de4dbba07af09b8b9 Mon Sep 17 00:00:00 2001 From: George Ogden <38294960+George-Ogden@users.noreply.github.com> Date: Sun, 19 Apr 2026 11:53:52 +0100 Subject: [PATCH 1/2] Fix generic default documentation Change the version defaults were added from Python 3.12 to Python 3.13 --- docs/spec/generics.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/spec/generics.rst b/docs/spec/generics.rst index c1fa05325..91362b89c 100644 --- a/docs/spec/generics.rst +++ b/docs/spec/generics.rst @@ -1849,7 +1849,7 @@ and a type checker should flag this as an error. AllTheDefaults[int, complex, str, int, bool] ) # All valid -With the new Python 3.12 syntax for generics (introduced by :pep:`695`), this can +With the new Python 3.13 syntax for generics (introduced by :pep:`695`), this can be enforced at compile time:: type Alias[DefaultT = int, T] = tuple[DefaultT, T] # SyntaxError: non-default TypeVars cannot follow ones with defaults From ebbdfbb81f73baeccab8a852d8b0039c8a62e0ba Mon Sep 17 00:00:00 2001 From: George Ogden <38294960+George-Ogden@users.noreply.github.com> Date: Sun, 19 Apr 2026 21:15:31 +0100 Subject: [PATCH 2/2] Update to more relevant PEP Co-authored-by: Alex Waygood --- docs/spec/generics.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/spec/generics.rst b/docs/spec/generics.rst index 91362b89c..f08911616 100644 --- a/docs/spec/generics.rst +++ b/docs/spec/generics.rst @@ -1849,7 +1849,7 @@ and a type checker should flag this as an error. AllTheDefaults[int, complex, str, int, bool] ) # All valid -With the new Python 3.13 syntax for generics (introduced by :pep:`695`), this can +With the new Python 3.13 syntax for generics (introduced by :pep:`696`), this can be enforced at compile time:: type Alias[DefaultT = int, T] = tuple[DefaultT, T] # SyntaxError: non-default TypeVars cannot follow ones with defaults