Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specs clarification: Forbid ClassVar and Final within TypedDict body #1890

Merged
merged 4 commits into from
Dec 8, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Typo
InSyncWithFoo committed Dec 1, 2024
commit 6bb9cfa4a94397ef30d08b449a749d0b938e208d
2 changes: 1 addition & 1 deletion docs/spec/class-compat.rst
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ annotated in ``__init__`` or other methods, rather than in the class::
self.content: T = content

``ClassVar`` cannot be used as a qualifier for a :ref:`TypedDict <typeddict>`
item or a :ref:`NamedTuple <namedtuple>`field. Such usages are also hard
item or a :ref:`NamedTuple <namedtuple>` field. Such usages are also hard
InSyncWithFoo marked this conversation as resolved.
Show resolved Hide resolved
errors at runtime.

.. _`override`:
2 changes: 1 addition & 1 deletion docs/spec/qualifiers.rst
Original file line number Diff line number Diff line change
@@ -204,7 +204,7 @@ following should be allowed::
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 usages are also hard
item or a :ref:`NamedTuple <namedtuple>` field. Such usages are also hard
errors at runtime.

.. _`annotated`: