[Python-checkins] cpython (2.7): Issue #26557: Note that mapping view methods are not present in UserDict or
raymond.hettinger
python-checkins at python.org
Sun Sep 11 23:38:32 EDT 2016
https://hg.python.org/cpython/rev/2b4bfef0d54a
changeset: 103683:2b4bfef0d54a
branch: 2.7
parent: 103638:5ca4c545dfe4
user: Raymond Hettinger <python at rcn.com>
date: Sun Sep 11 20:38:27 2016 -0700
summary:
Issue #26557: Note that mapping view methods are not present in UserDict or shelves.
files:
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
--- a/Doc/library/shelve.rst
+++ b/Doc/library/shelve.rst
@@ -53,8 +53,12 @@
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
--- a/Doc/library/userdict.rst
+++ b/Doc/library/userdict.rst
@@ -74,6 +74,9 @@
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
==================================================
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list