Skip to content

Commit 6112382

Browse files
authored
Clarify that tuple should not be prohibited as an argument to type (#2146)
* 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`. * Fix wordings for special form
1 parent 5587f77 commit 6112382

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/spec/special-types.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ concrete class object, e.g. in the above example::
188188
``type[T]`` where ``T`` is a type variable is allowed when annotating the
189189
first argument of a class method (see the relevant section).
190190

191-
Any other special constructs like ``tuple`` or ``Callable`` are not allowed
192-
as an argument to ``type``.
191+
Any other :term:`special forms <special form>` like ``Callable`` are not
192+
allowed as an argument to ``type``.
193193

194194
There are some concerns with this feature: for example when
195195
``new_user()`` calls ``user_class()`` this implies that all subclasses

0 commit comments

Comments
 (0)