On Thu, Aug 27, 2020 at 11:01 AM Ricky Teachey <ri...@teachey.org> wrote:

> What about something like this:
>>
>>
>>> class Name(NamedTuple):
>>>     first: str
>>>     last: str
>>>
>>> d = NamedKeyDict(Named)
>>> d[first='david', last='mertz'] = 1_000_000  # dollars
>>>
>>
right -- that would be a new custom class that took advantage of this
feature.

Are you suggesting that the built in dict be extended to support this? I'm
pretty sure Jonathan Fine did suggest that -- but I don't think that's a
good idea myself.

-CHB


-- 
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
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/ZPEV4XOMBXIOW4X2B26KLVBFT3L4NJOD/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to