Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/spec/class-compat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ annotated in ``__init__`` or other methods, rather than in the class::
def __init__(self, content):
self.content: T = content

``ClassVar`` cannot be used as a qualifier for a :ref:`TypedDict <typeddict>`
item or a :ref:`NamedTuple <namedtuple>` field. Such usage also generates
an error at runtime.

.. _`override`:

``@override``
Expand Down
4 changes: 4 additions & 0 deletions docs/spec/qualifiers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ following should be allowed::
Y: Final = "y"
N = NamedTuple("N", [(X, int), (Y, int)])

``Final`` cannot be used as a qualifier for a :ref:`TypedDict <typeddict>`
item or a :ref:`NamedTuple <namedtuple>` field. Such usage also generates
an error at runtime.

.. _`annotated`:

``Annotated``
Expand Down