PEP 308: Alternative conditional operator forms

Bengt Richter bokr at oz.net
Fri Feb 14 04:10:03 EST 2003


On Thu, 13 Feb 2003 15:08:53 -0800, Erik Max Francis <max at alcyone.com> wrote:
>No offense to your girlfriend, but I'm not sure this is useful
>information.  It is irrelevant what a _non_-programmer thinks about a
>particle syntax.  It's relevant what a _beginning_ programmer thinks
>about a particular syntax, in particular a beginning programmer _in that
>language_.
>
>In that context, I have no doubt that a beginning Python programmer --
>who has certainly been introduced the if...else construct in statements
>-- will be able to easily divine what
>
>	safeSqrt = (if x > 0: math.sqrt(x) else: 0.0)
>
>means.
I wonder if the beginning programmer might not expect
to be able to use safeSqrt(-3) and get 0.0 ;-)

Regards,
Bengt Richter




More information about the Python-list mailing list