Jean-Paul Calderone wrote:

> Not since Python 2.4:
> 
>     >>> dis.dis(lambda: x not in y)
>       1           0 LOAD_GLOBAL              0 (x)
>                   3 LOAD_GLOBAL              1 (y)
>                   6 COMPARE_OP               7 (not in)
>                   9 RETURN_VALUE
>     >>> dis.dis(lambda: not (x in y))
>       1           0 LOAD_GLOBAL              0 (x)
>                   3 LOAD_GLOBAL              1 (y)
>                   6 COMPARE_OP               7 (not in)
>                   9 RETURN_VALUE
>     >>>

Damn - I missed that change. Peephole optimiser I guess.

Tim Delaney
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to