PEP 308: A PEP Writer's Experience - PRO
Erik Max Francis
max at alcyone.com
Mon Feb 10 22:31:11 EST 2003
holger krekel wrote:
> because it easily leads to
>
> if obj.method() if hasattr(obj, 'method') else None:
>
> which you have a harder time to justify as nice, not?
This is yet another red herring. The use of a conditional operator as
the conditional expression in an if statement is bad style in any
language; that it would be obnoxious in Python is simply an
acknowledgement of that fact, and has no conseqeuences on the argument
of whether a conditional operator should be admitted to Python.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ Ride / Ride this wave of mine
\__/ Res
Esperanto reference / http://www.alcyone.com/max/lang/esperanto/
An Esperanto reference for English speakers.
More information about the Python-list
mailing list