gh-77566: Clarify setdefault() behavior for dbm objects#137911
gh-77566: Clarify setdefault() behavior for dbm objects#137911furkanonder wants to merge 2 commits intopython:mainfrom
Conversation
|
Perhaps we could use |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Only methods which are not common for all mappings are documented. I do not think that it is worth to document setdefault().
On other hand, not all mapping methods are implemented, and not all missing methods are mentioned.
| available, as well as :meth:`!get` and :meth:`!setdefault` methods. | ||
|
|
||
| .. note:: | ||
| Unlike the standard :class:`dict` type, the :meth:`dict.setdefault` method |
There was a problem hiding this comment.
This is self-contradictory. You need to refer to :meth:`!setdefault` instead of :meth:`dict.setdefault` .
Also, I suggest to refer to :term:`mapping` instead of :class:`dict` above.
|
|
||
| .. versionadded:: next | ||
|
|
||
| .. method:: sqlite3.setdefault(key, default) |
There was a problem hiding this comment.
No other methods are documented here, except reorganize(). Even close() is barely mentioned.
|
Many other documentation changes are needed. So I created other PR for them, and the |
|
See #137919. |
📚 Documentation preview 📚: https://cpython-previews--137911.org.readthedocs.build/