diff --git a/docs/spec/annotations.rst b/docs/spec/annotations.rst index 9ef5bfe5..e8886131 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