From 63c79966d5db67cdc8a50dff7577ebab92bb9c91 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sun, 11 Sep 2016 20:38:27 -0700 Subject: Issue #26557: Note that mapping view methods are not present in UserDict or shelves. --- Doc/library/shelve.rst | 8 ++++++-- Doc/library/userdict.rst | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst index 8c65790..4058c34 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 0585bda..2363a8e 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 ================================================== -- cgit v0.12