Skip to content

Commit e4a4780

Browse files
committed
don't state that Callable is a special form
1 parent 7f8f6bb commit e4a4780

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

docs/spec/annotations.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,6 @@ The following grammar describes the allowed elements of type and annotation expr
155155
: | <type> '[' name ']'
156156
: (where name must refer to a valid in-scope class
157157
: or TypeVar)
158-
: | <Callable> '[' '...' ',' `type_expression` ']'
159-
: | <Callable> '[' name ',' `type_expression` ']'
160-
: (where name must be a valid in-scope ParamSpec)
161-
: | <Callable> '[' <Concatenate> '[' (`type_expression` ',')+
162-
: (name | '...') ']' ',' `type_expression` ']'
163-
: (where name must be a valid in-scope ParamSpec)
164-
: | <Callable> '[' '[' `maybe_unpacked` (',' `maybe_unpacked`)*
165-
: ']' ',' `type_expression` ']'
166158
: | `tuple_type_expression`
167159
: | <Annotated> '[' `type_expression` ','
168160
: expression (',' expression)* ']'
@@ -199,7 +191,6 @@ Notes:
199191
from :py:mod:`typing` or ``typing_extensions``, except for ``None``, ``InitVar``,
200192
``type``, and ``tuple``. The latter two have aliases in :py:mod:`typing`: :py:class:`typing.Type`
201193
and :py:class:`typing.Tuple`. ``InitVar`` must be imported from :py:mod:`dataclasses`.
202-
``Callable`` may be imported from either :py:mod:`typing` or :py:mod:`collections.abc`.
203194
Special forms may be aliased
204195
(e.g., ``from typing import Literal as L``), and they may be referred to by a
205196
qualified name (e.g., ``typing.Literal``). There are other special forms that are not

0 commit comments

Comments
 (0)