Comment Comment by nikeee There is also a NamedTuple (notice the different casing) from the typing library, which doesn't seem to be mentioned in the article:https://docs.python.org/3/library/typing.html#typing.NamedTu... class Employee(NamedTuple): name: str id: int This is equivalent to: Employee = collections.namedtuple('Employee', ['name', 'id']) parent nikeee 5 years ago
https://docs.python.org/3/library/typing.html#typing.NamedTu...
This is equivalent to: