John Machin wrote:
> Of course. You can chain comparisons as much as you like and is
> (semi-)sensible, e.g.
>
Hmm, 'of course' is not the correct word for it. Although the Stef
Mientki would probably be able to find it in the documentation it is not
as simple as you might think.
Most languages interpret a == b == 2 as (a == b) == 2, or throw an error
because this syntax is not valid. The fact that python understand the
obvious meaning of this code, is quite unique to Python, as far as I know.
--
http://mail.python.org/mailman/listinfo/python-list