Andrew Breza

17%
Flag icon
A typed named tuple can also be constructed with the fields given as keyword arguments, like this: Coordinate = typing.NamedTuple('Coordinate', lat=float, lon=float) This is more readable, and also lets you provide the mapping of fields and types as **fields_and_types.
Fluent Python: Clear, Concise, and Effective Programming
Rate this book
Clear rating
Open Preview