On Tue, Feb 17, 2009 at 6:49 PM, Malcolm Tredinnick
<[email protected]> wrote:
...
> I'd be somewhat against this, I think. It's *very* easy to reuse
> querysets and inadvertently cause extra database queries.
...
> we're trading memory
> usage for speed and ease of use (and providing a way to improve the
> former in "expert mode").
Point taken.
I wish there were some way to issue a warning if _result_cache is
filled but __iter__ isn't used more than once. :-/
I could imagine a warning being issued if the functionality offered by
.iterator is used more than once. That might be a happy medium-- then
I could use .iterator as my default coding practice, and be slapped
when I iterate more than once after all.
if settings.DEBUG and self.prior_iteration:
warnings.warn("dope!")
?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---