diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index c930b876b3ccbf..de3eaa034be20a 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -5832,7 +5832,7 @@ The builtin functions :func:`isinstance` and :func:`issubclass` do not accept >>> isinstance([1, 2], list[str]) Traceback (most recent call last): File "", line 1, in - TypeError: isinstance() argument 2 cannot be a parameterized generic + TypeError: isinstance() argument 2 cannot be an argumentized generic type The Python runtime does not enforce :term:`type annotations `. This extends to generic types and their type parameters. When creating @@ -6087,7 +6087,7 @@ enables cleaner type hinting syntax compared to subscripting :class:`typing.Unio >>> isinstance([1], int | list[int]) Traceback (most recent call last): ... - TypeError: isinstance() argument 2 cannot be a parameterized generic + TypeError: isinstance() argument 2 cannot be an argumentized generic type The user-exposed type for the union object can be accessed from :class:`typing.Union` and used for :func:`isinstance` checks:: diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2026-03-09-18-40-57.gh-issue-145699.KqOPhy.rst b/Misc/NEWS.d/next/Core_and_Builtins/2026-03-09-18-40-57.gh-issue-145699.KqOPhy.rst new file mode 100644 index 00000000000000..dd65e7dc27e8e7 --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2026-03-09-18-40-57.gh-issue-145699.KqOPhy.rst @@ -0,0 +1 @@ +"parameterized generic" should be "argumentized generic type" diff --git a/Objects/genericaliasobject.c b/Objects/genericaliasobject.c index 7aef56cf4e93b8..950d26c6826264 100644 --- a/Objects/genericaliasobject.c +++ b/Objects/genericaliasobject.c @@ -753,7 +753,7 @@ static PyObject * ga_instancecheck(PyObject *self, PyObject *Py_UNUSED(ignored)) { PyErr_SetString(PyExc_TypeError, - "isinstance() argument 2 cannot be a parameterized generic"); + "isinstance() argument 2 cannot be an argumentized generic type"); return NULL; } @@ -761,7 +761,7 @@ static PyObject * ga_subclasscheck(PyObject *self, PyObject *Py_UNUSED(ignored)) { PyErr_SetString(PyExc_TypeError, - "issubclass() argument 2 cannot be a parameterized generic"); + "issubclass() argument 2 cannot be an argumentized generic type"); return NULL; }