[Python-checkins] bpo-31982: Improve sequence of presentation in ChainMap docs (GH-11960)

Miss Islington (bot) webhook-mailer at python.org
Wed Feb 20 16:49:27 EST 2019


https://github.com/python/cpython/commit/9b0c681e2d7e708a07e34d9c08e4424bdd4f5ebc
commit: 9b0c681e2d7e708a07e34d9c08e4424bdd4f5ebc
branch: master
author: Raymond Hettinger <rhettinger at users.noreply.github.com>
committer: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
date: 2019-02-20T13:49:23-08:00
summary:

bpo-31982: Improve sequence of presentation in ChainMap docs (GH-11960)



https://bugs.python.org/issue31982

files:
M Doc/library/collections.rst

diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 3fa8b32ff006..bde7b6e90082 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -163,8 +163,8 @@ contexts::
         e.maps[-1]            # Root context -- like Python's globals()
         e.parents             # Enclosing context chain -- like Python's nonlocals
 
-        d['x']                # Get first key in the chain of contexts
         d['x'] = 1            # Set value in current context
+        d['x']                # Get first key in the chain of contexts
         del d['x']            # Delete from current context
         list(d)               # All nested values
         k in d                # Check all nested values



More information about the Python-checkins mailing list