Update to PEP308: if-then-else expression

Aahz aahz at pythoncraft.com
Wed Feb 12 06:28:48 CET 2003


In article <UvednW5TN7_ZVtSjXTWc3A at comcast.com>,
Terry Reedy <tjreedy at udel.edu> wrote:
>
>I challenge this claim.  What means 'very rare'?  In the standard
>library, and/or conditionals are used at least twice as often as, for
>instance list.reverse().  Does that mean that the reverse method is a
>mistake?  (It is, after all, trivial to write a reverse function or
>reversing loop.)
>
>If they really think it will be so very rare, why are they so bent out
>of shape at the prospect of having to 'very rarely' read someone usage
>thereof?

Remember, it's not really *just* frequency, it's frequency times power.
list.reverse() is important solely because it is implemented at the C
level, making it much faster than a version written in Python.  More
than that, list.reverse() is obvious (IMO) in meaning in a way that none
of the forms of conditional expressions are: either they use "if" (which
gets confused with the statement form) or they're not directly obvious.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Register for PyCon now!  http://www.python.org/pycon/reg.html




More information about the Python-list mailing list