From e4a478074533ed69bdd304ef32dc74787e39a4eb Mon Sep 17 00:00:00 2001 From: kotlinisland <65446343+kotlinisland@users.noreply.github.com> Date: Mon, 9 Mar 2026 12:18:36 +1000 Subject: [PATCH] don't state that `Callable` is a special form --- docs/spec/annotations.rst | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/spec/annotations.rst b/docs/spec/annotations.rst index 9ef5bfe57..e88861312 100644 --- a/docs/spec/annotations.rst +++ b/docs/spec/annotations.rst @@ -155,14 +155,6 @@ The following grammar describes the allowed elements of type and annotation expr : | '[' name ']' : (where name must refer to a valid in-scope class : or TypeVar) - : | '[' '...' ',' `type_expression` ']' - : | '[' name ',' `type_expression` ']' - : (where name must be a valid in-scope ParamSpec) - : | '[' '[' (`type_expression` ',')+ - : (name | '...') ']' ',' `type_expression` ']' - : (where name must be a valid in-scope ParamSpec) - : | '[' '[' `maybe_unpacked` (',' `maybe_unpacked`)* - : ']' ',' `type_expression` ']' : | `tuple_type_expression` : | '[' `type_expression` ',' : expression (',' expression)* ']' @@ -199,7 +191,6 @@ Notes: from :py:mod:`typing` or ``typing_extensions``, except for ``None``, ``InitVar``, ``type``, and ``tuple``. The latter two have aliases in :py:mod:`typing`: :py:class:`typing.Type` and :py:class:`typing.Tuple`. ``InitVar`` must be imported from :py:mod:`dataclasses`. - ``Callable`` may be imported from either :py:mod:`typing` or :py:mod:`collections.abc`. Special forms may be aliased (e.g., ``from typing import Literal as L``), and they may be referred to by a qualified name (e.g., ``typing.Literal``). There are other special forms that are not