#24603: context.update() does not return a context manager like push()
--------------------------------+------------------------------------------
Reporter: cjerdonek | Owner: nobody
Type: Uncategorized | Status: new
Component: Template | Version: 1.7
system |
Severity: Normal | Keywords: template,context,push,update
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------------
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/24603>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.d41770779dfea1187dde9cb0bb9a2914%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.