On Dec 22, 2006, at 10:21 PM, Russell Keith-Magee wrote:
Same result, different composition. Personally, given Guido's
predisposition to eliminating reduce() in Python 3000 [1], I'd be
avoiding using reduce in new code.


Python 2.5 has any() and all() to replace reduce(). So I believe you could do this:

list = Model.objects.filter(any([Q(name__startswith=letter) for letter in 'abc']))

Don



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to