15 May
2017
15 May
'17
6:48 p.m.
I think it would be nice to have a generic NamedTuple interface in python: from typing import NamedTupleType def test( arguments: NamedTupleType ) -> NamedTupleType: return SomeType(**NamedTupleType._asdict) The rationale is that named tuple exposes a common API, and it would be nice to have it readily available.