On 2020-12-26 18:44, Steven D'Aprano wrote:
> >I think if we were designing mapping protocols now, that would be an
> >excellent idea, but we aren't, we have decades of history from `dict`
> >behind us. And protocols from dict use `keys()` and getitem. E.g.
> >update.
>
>    What do you mean by "protocols from dict"?  What are these protocols?
"And protocols from dict use `keys()` and getitem. E.g. update."

If I understand you right, that's not a protocol, that's just the behavior of the dict type specifically. As far as I can tell, it's not even documented behavior, so it doesn't constrain anything.

--
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail."
   --author unknown
_______________________________________________
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/KBUBD4DE4D4EFRMRJDRYLQJXFXTYXY2V/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to