bpo-31982: Improve sequence of presentation in ChainMap docs (GH-1196… · python/cpython@14baf06 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 14baf06
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 |