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.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/