Opened 11 years ago

Closed 11 years ago

#21645 closed Uncategorized (invalid)

QuerySets are lazy

Reported by: jflorian@… Owned by: nobody
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

In the example given at https://docs.djangoproject.com/en/1.5/topics/db/queries/#querysets-are-lazy, it might be good to note when exactly today() is evaluated. I'm quite certain it has to be when the filter is instantiated, not when print() is called, but clarification of this point would make this section even more useful to a wider audience, IMHO.

Change History (1)

comment:1 by Claude Paroz, 11 years ago

Resolution: invalid
Status: newclosed

Thanks for reporting, but I think this is plain evident, as today() is called, not passed as a callable. I don't read anything that may mean today() is evaluated during the print statement. I think we can assume some Python knowledge from our readers.

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