From: James Hilton-Balfe Date: Sun, 9 Apr 2023 21:55:32 +0000 (+0100) Subject: Fix old behaviour in typing documentation (#103400) X-Git-Tag: v3.12.0b1~585 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ecad802e3f9ef7063e7d7fe9f0c037561396ef8e;p=thirdparty%2FPython%2Fcpython.git Fix old behaviour in typing documentation (#103400) --- diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 03ff259bbdf7..15bab7775ead 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -423,7 +423,7 @@ to this is that a list of types can be used to substitute a :class:`ParamSpec`:: >>> class Z(Generic[T, P]): ... ... >>> Z[int, [dict, float]] - __main__.Z[int, (, )] + __main__.Z[int, [dict, float]] Furthermore, a generic with only one parameter specification variable will accept @@ -434,9 +434,9 @@ to the former, so the following are equivalent:: >>> class X(Generic[P]): ... ... >>> X[int, str] - __main__.X[(, )] + __main__.X[[int, str]] >>> X[[int, str]] - __main__.X[(, )] + __main__.X[[int, str]] Do note that generics with :class:`ParamSpec` may not have correct ``__parameters__`` after substitution in some cases because they