Christoph Zwerschke wrote:
> I think I just found a regression in 0.6.
>
> When evaluating the following SQL expression
>
>     sum(2*(func.length('bla'),))
>
> with SQLAlchemy 0.6beta3 I get a
> RuntimeError: maximum recursion depth exceeded
>
> With SQLAlchemy 0.5 this used to work,
> except that it was translated to
>
>    0 + length('bla') + length('bla')
>
> instead of simply
>
>   length('bla') + length('bla')

thanks for spotting that, its fixed in r50667f4ead3f / default tip.

the "0 +" seems to be some artifact of how sum() works:

>>> "asdf" + "asdf"
'asdfasdf'
>>> sum(["asdf", "asdf"])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'int' and 'str'


>
> -- Christoph
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to sqlalch...@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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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