PEP-308 a "simplicity-first" alternative

David Eppstein eppstein at
Fri Feb 14 07:46:57 CET 2003

In article <3E4C8329.1C13F41A at>,
 Erik Max Francis <max at> wrote:

> There is nothing wrong with Python's `and' and `or' semantics; they're
> very similar in functionality to those used in Lisp, for instance. 
> However, the use of the _idiom_ combining the two in order to attempt to
> the effect of a conditional operator -- `C and x or y' -- is idiomatic,
> unreadable, and _wrong_.  There are ways to fix it (with single-element
> lists or lambdas) that make it not wrong, but even more idiomatic and
> unreadable.  These aren't good solutions.

I think PEP was a subtle plot on Guido's part to get us to learn about 
the virtues of readability.

David Eppstein       UC Irvine Dept. of Information & Computer Science
eppstein at

More information about the Python-list mailing list