Code review comment for lp:~therve/storm/binary-and

Revision history for this message
James Henstridge (jamesh) wrote :

As an example of the python precedence problem, consider the following:

    >>> (1 | 6) & 4
    4

    >>> from storm.expr import compile_python, BitwiseAnd, BitwiseOr
    >>> expr = BitwiseAnd(BitwiseOr(1, 6), 4)
    >>> compile_python(expr)
    '1|6&3'
    >>> eval(compile_python(expr))
    5

More URLs for operator precedence:

    http://www.sqlite.org/lang_expr.html
    http://dev.mysql.com/doc/refman/5.0/en/operator-precedence.html

« Back to merge proposal