From: Raymond Hettinger Date: Mon, 12 Sep 2016 03:38:27 +0000 (-0700) Subject: Issue #26557: Note that mapping view methods are not present in UserDict or shelves. X-Git-Tag: v2.7.13rc1~130 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=63c79966d5db67cdc8a50dff7577ebab92bb9c91;p=python Issue #26557: Note that mapping view methods are not present in UserDict or shelves. --- diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst index 8c65790ed7..4058c3407f 100644 --- a/Doc/library/shelve.rst +++ b/Doc/library/shelve.rst @@ -53,8 +53,12 @@ lots of shared sub-objects. The keys are ordinary strings. to load a shelf from an untrusted source. Like with pickle, loading a shelf can execute arbitrary code. -Shelf objects support all methods supported by dictionaries. This eases the -transition from dictionary based scripts to those requiring persistent storage. +Shelf objects support most of the methods supported by dictionaries. This +eases the transition from dictionary based scripts to those requiring +persistent storage. + +Note, the Python 3 transition methods (:meth:`~dict.viewkeys`, +:meth:`~dict.viewvalues`, and :meth:`~dict.viewitems`) are not supported. Two additional methods are supported: diff --git a/Doc/library/userdict.rst b/Doc/library/userdict.rst index 0585bda4a5..2363a8ef2f 100644 --- a/Doc/library/userdict.rst +++ b/Doc/library/userdict.rst @@ -74,6 +74,9 @@ provide the following attribute: Starting with Python version 2.6, it is recommended to use :class:`collections.MutableMapping` instead of :class:`DictMixin`. + Note that DictMixin does not implement the :meth:`~dict.viewkeys`, + :meth:`~dict.viewvalues`, or :meth:`~dict.viewitems` methods. + :mod:`UserList` --- Class wrapper for list objects ==================================================