[Python-checkins] cpython (3.4): Issue #25286: Dictionary views are not sequences
martin.panter
python-checkins at python.org
Wed Oct 7 06:09:29 EDT 2015
https://hg.python.org/cpython/rev/92429e01f444
changeset: 98581:92429e01f444
branch: 3.4
parent: 98573:e670b37e7b14
user: Martin Panter <vadmium+py at gmail.com>
date: Wed Oct 07 09:56:46 2015 +0000
summary:
Issue #25286: Dictionary views are not sequences
Also change glossary heading from view
files:
Doc/glossary.rst | 15 ++++++++-------
Doc/library/collections.abc.rst | 2 +-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -183,6 +183,14 @@
keys can be any object with :meth:`__hash__` and :meth:`__eq__` methods.
Called a hash in Perl.
+ dictionary view
+ The objects returned from :meth:`dict.keys`, :meth:`dict.values`, and
+ :meth:`dict.items` are called dictionary views. They provide a dynamic
+ view on the dictionary’s entries, which means that when the dictionary
+ changes, the view reflects these changes. To force the
+ dictionary view to become a full list use ``list(dictview)``. See
+ :ref:`dict-views`.
+
docstring
A string literal which appears as the first expression in a class,
function or module. While ignored when the suite is executed, it is
@@ -853,13 +861,6 @@
``'\r'``. See :pep:`278` and :pep:`3116`, as well as
:func:`bytes.splitlines` for an additional use.
- view
- The objects returned from :meth:`dict.keys`, :meth:`dict.values`, and
- :meth:`dict.items` are called dictionary views. They are lazy sequences
- that will see changes in the underlying dictionary. To force the
- dictionary view to become a full list use ``list(dictview)``. See
- :ref:`dict-views`.
-
virtual environment
A cooperatively isolated runtime environment that allows Python users
and applications to install and upgrade Python distribution packages
diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst
--- a/Doc/library/collections.abc.rst
+++ b/Doc/library/collections.abc.rst
@@ -122,7 +122,7 @@
KeysView
ValuesView
- ABCs for mapping, items, keys, and values :term:`views <view>`.
+ ABCs for mapping, items, keys, and values :term:`views <dictionary view>`.
These ABCs allow us to ask classes or instances if they provide
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list