#10432: Empty generator in "in" lookup gives incorrect SQL
---------------------------------------------------+------------------------
Reporter: Anossov | Owner: mtredinnick
Status: closed | Milestone:
Component: Database layer (models, ORM) | Version: SVN
Resolution: fixed | Keywords: sql where
Stage: Unreviewed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Comment (by Anossov):
Replying to [comment:1 mtredinnick]:
> I notice that this bug is somehow specific to a generator being used in
the example, since using a list comprehension (or any other sequence)
does't demonstrate the problem.
That's why it says "generator", not "sequence" in the title ;) bool(<any
generator object> is True, bool([sequence with len=0]) is False
--
Ticket URL: <http://code.djangoproject.com/ticket/10432#comment:4>
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 [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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---