On Tue, Sep 08, 2009 at 15:09 -0700, drednot57 wrote:
> 
> Traceback (most recent call last): File "selectdemo.py", line 55, in
> <module> s = users.select(users.c.name.in_('Mary', 'Susan'))
> TypeError: in_() takes exactly 2 arguments (3 given)
 
> # The "in" and "between" operations are also available s =
> users.select(users.c.age.between(30,39)) run(s) # Extra underscore
> after "in" to avoid conflict with Python keyword s =
> users.select(users.c.name.in_('Mary', 'Susan')) run(s)
                                ^^^^^^^^^^^^^^^ here be dragons!

You just have to change in_('Mary', 'Susan') to in_(['Mary', 'Susan']).
                                                    ^               ^
in_() takes a *list* not a number of arguments.

with kind regards

    Wolodja Wentland

Attachment: signature.asc
Description: Digital signature

Reply via email to