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

William wilk-spamout at flibuste.net
Sat Feb 8 14:58:49 EST 2003


aahz at pythoncraft.com (Aahz) writes:

> In article <4u7a4voupd3omflha9p0a29hi7ju29l276 at 4ax.com>,
> Dale Strickland-Clark  <dale at riverhall.NOTHANKS.co.uk> wrote:
> >
> >So if this feature is added, you won't use it, right?
> >That means it won't affect you one way or the other.
> 
> Wrong.
> 
> >So voting against it would be merely an attempt to scupper it for
> >those of us who would really like this?
> 
> Wrong.
> 
> Those of us who dislike it don't want to read code with it -- which will
> almost certainly happen if adopted.
> 
> Here's an excellent post by Mark Lutz from python-dev.  Mark spends much
> of his time teaching Python, so he's in a good position to evaluate how
> new features impact the ease of learning and using the language:
> 
> http://mail.python.org/pipermail/python-dev/2003-February/032983.html

So i just try it ! I explain it to a completly newbie who has never seen
any langage.
After explaining the classic if ...: else:... i show the pep, she
understood it imediatly.

Often people compare this to list comprehension. I try to explain it, it
was a lot more difficult and she did'nt see where it could be
interesting. (She understood for and list imediatly)

Finaly i show the sames examples in C, and she understood imediatly why
python is cool, even with the new pep !

So, don't worry for the beginers, the teatchers and the
rereaders... This new pep is intuitive and pythonic.

-- 
William Dode - http://flibuste.net




More information about the Python-list mailing list