Django

Code

Ticket #11711 (closed: fixed)

Opened 1 year ago

Last modified 4 months ago

Document precise returned object of values_list()

Reported by: mtredinnick Assigned to: mtredinnick
Milestone: Component: Documentation
Version: 1.1 Keywords:
Cc: Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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.

Attachments

Change History

08/12/09 21:51:56 changed by mtredinnick

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

03/09/10 21:41:42 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

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

04/12/10 08:28:47 changed 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.


Add/Change #11711 (Document precise returned object of values_list())




Change Properties
Action