Skip to content

Switching NamedTuple declaration to the preferred declaration for typing NamedTuple

alex_zharichenko requested to merge alex_zharichenko/flatland-book:master into master

namedtuple is preferablly done with just declaring everything in one line.

But, if using the typing version NamedTuple it's preferable to use the class definition as it helps with the readability problem the occurs when adding typing information to a namedtuple.

Source: https://docs.python.org/3/library/typing.html#typing.NamedTuple

Merge request reports