Looking at models.Manager, I noticed that for convenience it implements
many of the public methods of QuerySet, delegating the calls to its
query set.  This obviously allows for more convenient behaviour, such
as writing  MyModel.objects.filter(whatever)  instead of
MyModel.objects.all().filter(whatever).

However, I constantly trip over the fact that it doesn't implement
__iter__, as it seems natural to me to do  for(obj in MyModel.objects).
 Is there a particular reason for not implementing it?  I can
understand that implementing __len__ and __getitem__ would encourage
inefficient code (due to the results not being cached), but is there
any such problem with implementing __iter__?


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to