[Python-ideas] NamedTuple Interface

Fabrizio Messina zauddelig at gmail.com
Mon May 15 09:18:03 EDT 2017

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170515/68db0730/attachment.html>

More information about the Python-ideas mailing list