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

Samuele Pedroni pedronis at bluewin.ch
Tue Feb 11 12:44:17 EST 2003


"Andrew Koenig" <ark at research.att.com> ha scritto nel messaggio
news:yu99n0l2pvtj.fsf at europa.research.att.com...
> 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