]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-31982: Improve sequence of presentation in ChainMap docs (GH-11960)
authorRaymond Hettinger <rhettinger@users.noreply.github.com>
Wed, 20 Feb 2019 21:49:23 +0000 (13:49 -0800)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 20 Feb 2019 21:49:23 +0000 (13:49 -0800)
https://bugs.python.org/issue31982

Doc/library/collections.rst

index 3fa8b32ff006f53deb98f1758ed4e38b4c0f4320..bde7b6e90082de6feac9bdd8f18ac5b7518c573e 100644 (file)
@@ -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