PEP 308: Alternative conditional operator forms

holger krekel pyth at
Mon Feb 10 19:30:49 CET 2003

Tim Peters wrote:
> [holger krekel]
> >> No, that's not a short-circuiting form.
> > which is rarely needed.  Tim Peters <wink> said that with the hundred
> > cases of the beloved "x and y or z" idiom in the 150+ modules of
> > Python it's needed exactly 0 (zero) times.
> Nope.  I said the relative handful of examples I included didn't need
> short-circuiting, and that it was rarely needed.

Yup, i mixed up. 

> [good examples of and/or short-circuit usage in standard lib]

> In the end, I didn't find any code in the std library I'd change if the PEP
> were to be accepted.  I didn't study every line, though.

That is still a good point. 

Easy to get confused these days. I should stop posting to this 
thread for a while.  It's almost getting an addiction and everything
else than PEP-308 suddenly seems to uninteresting <self.wink>.


More information about the Python-list mailing list