PEP 308: Pep Update
Sean Ross
sross at connectmail.carleton.ca
Thu Feb 27 10:56:03 EST 2003
"Lulu of the Lotus-Eaters" <mertz at gnosis.cx> wrote in message
news:mailman.1046332734.23329.python-.
>
> In every Python construct that exists now, a condition is stated BEFORE
> the actions that depend on it.
>
Hi.
"Contrariwise", this is not true in 'every' Python construct:
seq = range(100)
evensquares = [x*x for x in seq if not x%2]
So, 'The ternary form "x if C else y" [does not break] this uniformity',
list comprehensions do.
+1 "x if C else y"
More information about the Python-list
mailing list