Add the ability to use context.update() as a context manager
The documentation says you can use context.push() as a context manager:
You can also use push() as a context manager to ensure a matching pop() is called.
And the documentation says this about context.update():
This works like push() but takes a dictionary as an argument and pushes that dictionary onto the stack instead of an empty one.
However, update() doesn't seem to act as a context manager like push() does (which I would have found useful). Is there a reason for the difference? If the difference is deliberate, it seems like the documentation should note this difference.
Change History
(8)
| Cc: |
chris.jerdonek@… added
|
| Summary: |
context.update() does not return a context manager like push() → Add the ability to use context.update() as a context manager
|
| Triage Stage: |
Unreviewed → Accepted
|
| Type: |
Uncategorized → New feature
|
| Version: |
1.7 → master
|
| Owner: |
changed from nobody to Tommy Beadle
|
| Status: |
new → assigned
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Resolution: |
→ fixed
|
| Status: |
assigned → closed
|
I guess it's probably not a feature that's been requested. See a3e7d73ed7d90d31de46c60d40424267f62e411c for the addition of the context manager to
push().