[sqlalchemy] Re: Tutorial program 'selectdemo.py'

2009-09-09 Thread Dan Presley

Thanks much!  I couldn't find where that module is buried inside the 
documentation, hence my question.

Best Regards,

Dan Presley

--~--~-~--~~~---~--~~
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 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: Tutorial program 'selectdemo.py'

2009-09-08 Thread Wolodja Wentland
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


signature.asc
Description: Digital signature