PEP 308: Alternative conditional operator forms

Samuele Pedroni pedronis at bluewin.ch
Mon Feb 10 19:13:04 CET 2003


"Tim Peters" <tim.one at comcast.net> ha scritto nel messaggio
news:mailman.1044899301.27653.python-list at python.org...
>
> 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.
>

but I think ideally Andrew Koenig would want them changed for pedagogical
reasons.

OTOH personally I think I would still use _ and _ or _ were it works, if the
PEP got approved but the chosen variant is less readable, than what is
basically an idiomatic form to take as such.

Furhter people ideally should still learn how and/or works, if we want them
to write:

if obj and obj.isempty():
 ...

instead of some if (if ...) variant.

.






More information about the Python-list mailing list