For review: PEP 308 - If-then-else expression
Erik Max Francis
max at alcyone.com
Mon Feb 10 00:37:28 EST 2003
Samuele Pedroni wrote:
> I would not call lambda syntax felicitous and it's an heavyweight
> syntax.
But it's already there, so it trumps that objection. It's a
well-entrenched Python feature, so it's a priori Pythonic, even if Guido
sort of changed his mind :-).
> My benchmark for what I would live with is:
>
> _ and _ or _
>
> substitute 'and' and 'or' with something appropriate and short.
But I'm not aware of anything that would get things in the left-to-right
order that wouldn't introduce a new keyword (or two), are you?
> > if C: x else: y
> >
> > reads left-to-right, requires no new keywords or punctuation, is
> > unambiguous, and is totally analogous to the if...else statement and
> > thus is crystal clear.
>
> thus it hurts my eyes.
_Thus_ it hurts your eyes?
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ She glanced at her watch ... It was 9:23.
\__/ James Clavell
Bosskey.net: Quake III Arena / http://www.bosskey.net/q3a/
A personal guide to Quake III Arena.
More information about the Python-list
mailing list