diff options
author | Martin Panter <vadmium+py@gmail.com> | 2015-10-07 10:04:49 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2015-10-07 10:04:49 (GMT) |
commit | 6568714366e8c7c7222681a5ddcc13c57b7495a2 (patch) | |
tree | 36dbbc80f8b8612c801f4c5c5c60612cbfe601a9 /Doc | |
parent | 6f038ada5bd1bc2838e20f0b22de1780e7ce709d (diff) | |
parent | 397625e43280c1dec19af59c53704e0d95b557d5 (diff) | |
download | cpython-6568714366e8c7c7222681a5ddcc13c57b7495a2.zip cpython-6568714366e8c7c7222681a5ddcc13c57b7495a2.tar.gz cpython-6568714366e8c7c7222681a5ddcc13c57b7495a2.tar.bz2 |
Issue #25286: Merge dictionary view glossary from 3.5
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/glossary.rst | 15 | ||||
-rw-r--r-- | Doc/library/collections.abc.rst | 2 | ||||
-rw-r--r-- | Doc/library/collections.rst | 4 |
3 files changed, 11 insertions, 10 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst index 846c01a..daaeb95 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -241,6 +241,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.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 @@ -934,13 +942,6 @@ Glossary ``'\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 index 563c1bc..d9b93ad 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -150,7 +150,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>`. .. class:: Awaitable diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index f820748..40809d9 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -1021,8 +1021,8 @@ keyword arguments, but their order is lost because Python's function call semantics pass-in keyword arguments using a regular unordered dictionary. .. versionchanged:: 3.5 - The items, keys, and values :term:`views <view>` of :class:`OrderedDict` now - support reverse iteration using :func:`reversed`. + The items, keys, and values :term:`views <dictionary view>` + of :class:`OrderedDict` now support reverse iteration using :func:`reversed`. :class:`OrderedDict` Examples and Recipes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |