For review: PEP 308 - If-then-else expression
Aahz
aahz at pythoncraft.com
Mon Feb 10 10:32:33 EST 2003
In article <1nJ1a.159273$0v.4459464 at news1.tin.it>,
Alex Martelli <aleax at aleax.it> wrote:
>Anthony Baxter wrote:
>>
>> On the other hand, I don't like this. If you need to do something like
>> this, why not just
>>
>> [ v_0, v_1, v_2, ... ][i] ?
>
>Indexing isn't lazy: all the sub-expressions would be evaluated
>first -- no "short-circuiting". The -> idea would evaluate only
>the i'th sub-expression.
Short-circuiting is nice, but how often do you really need it?
--
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