Skip to content

NamedTupleInterface #431

@zauddelig

Description

@zauddelig

Hello, I already wrote on python-ideas group, I frequently am in need to have abstract access to the NamedTuple API, here a very simple exapmple:

from typing import NamedTupleType

def test(
    arguments: NamedTupleType
) -> NamedTupleType:
    return SomeType(**NamedTupleType._asdict) 

At the moment I have two hotfix:
Overload the namedtuple factory, but somewhat breaking my IDE or creating a fake namedtuple but both of them are hacks.

If my proposal get accepted I'm willingly to do the coding part :)
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions