-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
gh-83448: Fix dict's __missing__ documentation #17911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
bump |
terryjreedy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My first thought is that the entry should stay where it is, though something may need to be added somewhere. Special method should not have to be part of an ABC to be documented in the special methods doc. This section long predated ABCs. I will have to look at the linked discussion when I have more time. So I don't know what change, if any, to suggest at the moment.
Thing is, I'm not implying any opinion on whether it should be there or not. At the moment, you have Continuing with that logic, Furthermore - it's specifically As a side note, the PR changes |
|
Per Guido on the mailing list, maybe @rhettinger can suggest something (seeing that you reviewed/merged #17910 as well). |
|
|
||
| .. method:: __missing__(key) | ||
|
|
||
| Not implemented by default. Called by :class:`dict`\ .\ :meth:`__getitem__` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Not implemented by default. Called by :class:`dict`\ .\ :meth:`__getitem__` | |
| Not implemented by default. Called by :meth:`dict.__getitem__` |
|
I agree about not moving the entry. |
According to the mailing list discussion, fixed dict's documentation to account for get() not calling
__missing__and moved__missing__from the data model to dict as it's a dict-only method and not part of the Mapping ABC.