typing.NamedTuple
In the typing module there's a typed
version of collections.namedtuple.
class Employee(typing.NamedTuple):
name: str
age: int
department: str
typing.NamedTupleIn the typing module there's a typed
version of collections.namedtuple.
class Employee(typing.NamedTuple):
name: str
age: int
department: str