From 86f7688a5f8e935bf9d3fa16817c92e326789d09 Mon Sep 17 00:00:00 2001 From: Fangyi Zhou Date: Tue, 6 Jan 2026 22:09:07 +0000 Subject: [PATCH 1/2] Clarify that `tuple` should be accepted as an argument to `type` Closes #2145 This spec change reconciles the typing spec and the conformance testsuite. `tuple` is an object of the `type` class, so it should be accepted as a value of `type`. --- docs/spec/special-types.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/spec/special-types.rst b/docs/spec/special-types.rst index dbec130c..498d43b4 100644 --- a/docs/spec/special-types.rst +++ b/docs/spec/special-types.rst @@ -188,8 +188,9 @@ concrete class object, e.g. in the above example:: ``type[T]`` where ``T`` is a type variable is allowed when annotating the first argument of a class method (see the relevant section). -Any other special constructs like ``tuple`` or ``Callable`` are not allowed -as an argument to ``type``. +Any other special constructs like ``Callable`` are not allowed +as an argument to ``type``, +but ``tuple`` is allowed as an argument to ``type``. There are some concerns with this feature: for example when ``new_user()`` calls ``user_class()`` this implies that all subclasses From bd2844282e4caa0fcc83fc28ebbd040e69dcbbe0 Mon Sep 17 00:00:00 2001 From: Fangyi Zhou Date: Wed, 7 Jan 2026 20:50:36 +0000 Subject: [PATCH 2/2] Fix wordings for special form --- docs/spec/special-types.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/spec/special-types.rst b/docs/spec/special-types.rst index 498d43b4..eab658b0 100644 --- a/docs/spec/special-types.rst +++ b/docs/spec/special-types.rst @@ -188,9 +188,8 @@ concrete class object, e.g. in the above example:: ``type[T]`` where ``T`` is a type variable is allowed when annotating the first argument of a class method (see the relevant section). -Any other special constructs like ``Callable`` are not allowed -as an argument to ``type``, -but ``tuple`` is allowed as an argument to ``type``. +Any other :term:`special forms ` like ``Callable`` are not +allowed as an argument to ``type``. There are some concerns with this feature: for example when ``new_user()`` calls ``user_class()`` this implies that all subclasses