Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#11711 closed (fixed)

Document precise returned object of values_list()

Reported by: mtredinnick Owned by: mtredinnick
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: UI/UX:

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 Changed 6 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 5 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(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.

comment:3 Changed 5 years ago by kmtracey

(In [12953]) [1.1.X] 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.

r12743 from trunk.

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