For review: PEP 308 - If-then-else expression

Samuele Pedroni pedronis at
Tue Feb 11 18:44:17 CET 2003

"Andrew Koenig" <ark at> ha scritto nel messaggio
news:yu99n0l2pvtj.fsf at
> Samuele> I don't like the naive questions that if: else: statement
> Samuele> vs. if: else: conditional expression could generate.
> Such as?

You should not assume that people have done their homework when they ask
this kind of thing or that they have a firm grasp of the conceptual
framework of things, people typically come with "why this does not work?"
and you think: it is clear that it cannot work.

(if x>0: print "positive" else: print "negative")
(for x in l: print x)

I'm not naive enough...

More information about the Python-list mailing list