-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01/03/2012 10:42 AM, Alex Gaynor wrote: > I haven't analyzed your suggestion in detail Carl, but there is a good > reason for managers to exist:
> querysets cache internally on iteration, managers are not directly > evaluable, but were they you could end up doing something like: > for instance in Model.objects: > pass > and you'd cache those results in global state. Indeed, that's of those devils in the details, but it's not insurmountable. Clearly, either the Model metaclass or the hypothetical "manager" function would need to do something to the provided QuerySet to make it not iterable directly. This could be a pretty simple flag on QuerySet, it doesn't require a separate class. Carl -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8DQEsACgkQFRcxmeyPUXI5DQCffoTuvSuJ84HlQq1F8SGv6yRX SFMAniE3FhaGH5eVlrgtSy3se/g2/4Nj =lqm7 -----END PGP SIGNATURE----- -- 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.
