On Thu, Aug 27, 2020, 1:35 PM Ricky Teachey

> Conceptually, an "immutable collection" serves a different purpose than "a
>> collection of axes", even if they work then same under the hood.
>>
>
> What about something like this:
>
> class Name(NamedTuple):
>     first: str
>     last: str
>
> d = NamedKeyDict(Named)
> d[first='david', last='mertz'] = 1_000_000  # dollars
>

Sure, maybe. But this is probably better as a dataclass nowadays. Actually,
I'm not sure what NamedKeyDict is meant to do in your example.

>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/ARDDXFMKQS54G4YMTL2CUPMG2NMT7WH4/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to