bpo-31982: Improve sequence of presentation in ChainMap docs (GH-1196… · python/cpython@14baf06 (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit 14baf06

miss-islingtonrhettinger

and

committed

File tree

1 file changed

lines changed

1 file changed

lines changed

Lines changed: 1 addition & 1 deletion

Original file line number Diff line number Diff line change
@@ -163,8 +163,8 @@ contexts::
163 163 e.maps[-1] # Root context -- like Python's globals()
164 164 e.parents # Enclosing context chain -- like Python's nonlocals
165 165
166 - d['x'] # Get first key in the chain of contexts
167 166 d['x'] = 1 # Set value in current context
167 + d['x'] # Get first key in the chain of contexts
168 168 del d['x'] # Delete from current context
169 169 list(d) # All nested values
170 170 k in d # Check all nested values