summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2015-10-07 10:19:39 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2015-10-07 10:19:39 (GMT)
commit4a33724d47237718bd7d770cc1e859b3ad4fc1eb (patch)
tree39f9bc5cc4f80e1dab109a941483285a7c40b2eb
parente904427285f7227c7babf6e171fdd4ea26cafc43 (diff)
downloadcpython-4a33724d47237718bd7d770cc1e859b3ad4fc1eb.zip
cpython-4a33724d47237718bd7d770cc1e859b3ad4fc1eb.tar.gz
cpython-4a33724d47237718bd7d770cc1e859b3ad4fc1eb.tar.bz2
Issue #25286: Dictionary views are not sequences
Also change glossary heading from "view" to "dictionary view". Patch by Akira Li.
-rw-r--r--Doc/glossary.rst15
-rw-r--r--Doc/library/collections.rst2
2 files changed, 9 insertions, 8 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index 010fdf2..6e3083f 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -182,6 +182,14 @@ Glossary
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.viewkeys`, :meth:`dict.viewvalues`,
+ and :meth:`dict.viewitems` 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
+ 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
@@ -713,13 +721,6 @@ Glossary
``'\r'``. See :pep:`278` and :pep:`3116`, as well as
:func:`str.splitlines` for an additional use.
- view
- The objects returned from :meth:`dict.viewkeys`, :meth:`dict.viewvalues`,
- and :meth:`dict.viewitems` 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.rst b/Doc/library/collections.rst
index 3c4c128..58278d1 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -978,7 +978,7 @@ ABC Inherits from Abstract Methods Mixin
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