On Sun, Jan 22, 2012 at 12:47 AM, Andrea Crotti
<andrea.crott...@gmail.com> wrote:
> So I tried to do the following, and the result is surprising.  For what
> I can see it looks like the interpreter can optimize away the 1 boolean
> conversion while it doesn't with the True, the opposite of what I
> supposed.
>
> Anyone can explain me why is that, or maybe is my conclusion wrong?

In Python 3, they compile to the same code, because 'True' is a
keyword. In Python 2, you can reassign True to be 0.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to