I think this is a bug; it should either result in an error or work as 
expected - in python this **is** valid after all:

>>> str(X.query.filter(2 < X.id < 5))
'SELECT x.id AS x_id \nFROM x \nWHERE x.id > :id_1'

This shouldn't generate the following SQL

>>> str(X.query.filter(2 < X.id))
'SELECT x.id AS x_id \nFROM x \nWHERE x.id > :id_1'

but rather this SQL:

>>> str(X.query.filter(2 < X.id, X.id < 5))
'SELECT x.id AS x_id \nFROM x \nWHERE x.id > :id_1 AND x.id < :id_2'

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/AVEGlzInKBkJ.
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.

Reply via email to