On Tuesday 27 May 2008 23:37:20 mg wrote:
> i am trying to generate an or_ clauselist and was wondering if i
> could do so with a list comprehension, below is a small example of
> what i first tried:
> status = [1,2,3]
> or_([users.c.status_id == item for item in status])
>
> any ideas or tips would be great.
how about
 or_(*[users.c.status_id == item for item in status])
?
note the * for *args

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

Reply via email to