1 or 1/0 doesn't raise an exception

Wojciech Muła wojciech_mula at poczta.null.onet.pl.invalid
Sun Dec 14 03:14:37 CET 2008


"Daniel Fetchinson" <fetchinson at googlemail.com> wrote:

> Is it a feature that
> 
> 1 or 1/0
> 
> returns 1 and doesn't raise a ZeroDivisionError? If so, what's the rationale?

See: http://en.wikipedia.org/wiki/Short-circuit_evaluation



More information about the Python-list mailing list