#11711 closed (fixed)
Document precise returned object of values_list()
Reported by: | Malcolm Tredinnick | Owned by: | Malcolm Tredinnick |
---|---|---|---|
Component: | Documentation | Version: | 1.1 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
At least one group of highly trained Django developers was tripped up by believing my old documentation, instead of inferring that it must have been slightly imprecise because of the section of documentation it was in.
The values_list()
call returns a QuerySet
subclass that can be evaluated to a list of thingies. It doesn't actually return a list (you can further filter and slice and dice it before retrieving the values). We should fix the slightly inaccurate language to avoid this happening again.
Change History (3)
comment:1 by , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 15 years ago
Note:
See TracTickets
for help on using tickets.
(In [12743]) Fixed #11711 -- clarified that ValuesQuerySets are not lists per se.
It rarely hurts to think of the returned result from a values() or
values_list() call as a list, but it's really an iterable and sometimes
the difference matters.