John Roth wrote:

> It's not an error. As one of the first responders said, check
> the language definition. That defines both 'in' and 'is'
> as equality operators, and defines exactly what a chain
> of equality operators means.
> 
> In this case, it means:
> 
> (0 in l) and (l is False)
> 
> The and short circuits, giving the result of False without
> ever doing the final comparison.
> 
> Granted, that's not exactly obvious...

Thanks ; you learn something every day :)

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

Reply via email to