Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#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

Change History (4)

comment:1 by Cole Maclean, 8 years ago

Has patch: set

comment:2 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In 6d9c5d4:

Fixed #26636 -- Fixed typo in docs/ref/request-response.txt

comment:3 by Tim Graham <timograham@…>, 8 years ago

In 3a7f76a8:

[1.9.x] Fixed #26636 -- Fixed typo in docs/ref/request-response.txt

Backport of 6d9c5d46e644a8ef93b0227fc710e09394a03992 from master

comment:4 by Tim Graham <timograham@…>, 8 years ago

In e06bbf8f:

[1.8.x] Fixed #26636 -- Fixed typo in docs/ref/request-response.txt

Backport of 6d9c5d46e644a8ef93b0227fc710e09394a03992 from master

Note: See TracTickets for help on using tickets.
Back to Top