On Thu, Aug 27, 2020 at 2:14 PM Christopher Barker <[email protected]> wrote:
> On Thu, Aug 27, 2020 at 11:01 AM Ricky Teachey <[email protected]> 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 -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/LR6ABDATUFTNRV4Z6RYP4AJKTD6YPIKY/ Code of Conduct: http://python.org/psf/codeofconduct/
