[Python-Dev] "and" and "or" operators in Py3.0

Gisle Aas gisle at ActiveState.com
Tue Sep 20 08:44:39 CEST 2005

"Raymond Hettinger" <raymond.hettinger at verizon.net> writes:

> 2) When going back and forth between languages, it is easy to forget
> that only Python returns something other than a boolean.

Perl certainly works the same way and I've never heared anybody have
problems with that, but that might be because Perl do have the
expr?v1:v2 triary operator as well.  Most Perl programs use constructs
like "a = v1 or v2 or v3" (or even "a ||= v") to its advantage.


More information about the Python-Dev mailing list