James Bennett wrote:
> On 7/13/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>> I'm biased, because I have an immediate need for this in a project,
>> but this seems general and useful enough for inclusion in QuerySet.
> 
> Implementing the check in __nonzero__ and having people test by doing
> 'if some_queryset' or 'if not some_queryset' feels more Pythonic,
> while implementing it as a specialized 'exists' method feels closer to
> SQL. Since the Django ORM already leans more toward the Python side
> than the SQL, I'd say do __nonzero__ and advise boolean checks on
> QuerySets instead of implementing a method to do the same.

I agree, James.  I'm +1 for __nonzero__ and -1 for .exists()

Gary

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to