From: Martin Panter Date: Wed, 7 Oct 2015 09:56:46 +0000 (+0000) Subject: Issue #25286: Dictionary views are not sequences X-Git-Tag: v3.5.1rc1~201^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=85b8f45515a08afd75ca38b3760defabd219a632;p=python Issue #25286: Dictionary views are not sequences Also change glossary heading from view --- diff --git a/Doc/glossary.rst b/Doc/glossary.rst index 1de86ef8c0..c8af5f3090 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -183,6 +183,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 @@ -853,13 +861,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 99c43113e3..d73f05ae56 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -122,7 +122,7 @@ ABC Inherits from Abstract Methods Mixin KeysView ValuesView - ABCs for mapping, items, keys, and values :term:`views `. + ABCs for mapping, items, keys, and values :term:`views `. These ABCs allow us to ask classes or instances if they provide