1 or 1/0 doesn't raise an exception

Benjamin Kaplan benjamin.kaplan at case.edu
Sun Dec 14 04:25:07 CET 2008


Not that I'm against promoting Python, but most languages have support for
short circuit evaluation. That's why you usually use && and || in C, C++, C#
and Java- & and | will always evaluate both sides. Short circuit evaluation
is what allows you to write things like "if foo is not None and
foo.isTrue()".


On Sat, Dec 13, 2008 at 9:57 PM, r <rt8396 at gmail.com> wrote:

> These are just the kind of things that make Python so beautiful ;)
> Thanks Guido!
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20081213/7785d43b/attachment.html>


More information about the Python-list mailing list