4 ms·
Variable annotations were only added in Python 3.6. Defining a typed namedtuple in Python 3.5 looked like this: Foo = typing.NamedTuple('Foo', [('a', int),
by auscompgeek 3y ago
Variable annotations were only added in Python 3.6. Defining a typed namedtuple in Python 3.5 looked like this:
Foo = typing.NamedTuple('Foo', [('a', int), ('b', str)])