#11402: exists() method on QuerySets
---------------------------------------------------+------------------------
          Reporter:  Alex                          |         Owner:  nobody
            Status:  closed                        |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  1.0   
        Resolution:  fixed                         |      Keywords:        
             Stage:  Accepted                      |     Has_patch:  0     
        Needs_docs:  0                             |   Needs_tests:  0     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Comment (by jacob):

 I decided on `exists()` for a couple reasons:

   * While I like the any/all symmetry, the fact that they return different
 types (qs/bool) is weird and not at all the same as Python's any/all.
   * I think `if qs.exists(): ...` "scans" better than `if qs.any(): ...`

 Neither big deals, but I thought I'd record my paint-choosing thought
 processes for posterity.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/11402#comment:9>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to