On Thu, Aug 27, 2020 at 2:14 PM Christopher Barker <python...@gmail.com>
wrote:

> 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
>

No not the built-in, but maybe as an addition to the collections module.

---
Ricky.

"I've never met a Kentucky man who wasn't either thinking about going home
or actually going home." - Happy Chandler
_______________________________________________
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/LR6ABDATUFTNRV4Z6RYP4AJKTD6YPIKY/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to