Skip to content

Conversation

@DimitriPapadopoulos
Copy link
Contributor

Inheriting from typing.NamedTuple creates a custom tuple subclass in the same way as using the collections.namedtuple factory function. However, using typing.NamedTuple allows you to provide a type annotation for each field in the class.

Inheriting from `typing.NamedTuple` creates a custom `tuple` subclass
in the same way as using the `collections.namedtuple` factory function.
However, using `typing.NamedTuple` allows you to provide a type annotation
for each field in the class.
@brettcannon
Copy link
Member

What's the point of the change if there's no change in typing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants