#26636 closed Cleanup/optimization (fixed)
Example in QueryDict.update docs is wrong
| Reported by: | Cole Maclean | Owned by: | nobody |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The example given in the docs for QueryDict.update (1) contains
>>> q = QueryDict('a=1', mutable=True)
>>> q.update({'a': '2'})
>>> q['a'] # returns the last
['2']
The actual return value of q['a'] is '2'.
(1): https://docs.djangoproject.com/en/dev/ref/request-response/#django.http.QueryDict.update
Note:
See TracTickets
for help on using tickets.
Patch here: https://github.com/cole/django/tree/ticket_26636