[Python-Dev] vox populii illiterati

Juan David Ib��ez Palomar j-david@noos.fr
Mon, 10 Feb 2003 09:41:14 +0100


Guido van Rossum wrote:

>>ouch, that's an interesting pro twist:
>>
>>http://mail.zope.org/pipermail/zope-dev/2003-February/018725.html
>>
>>"... I think, we want an "if-then-else" expression for Zope, as it would
>>make decisions in TALES expressions ...
>>Do not forget to vote!"
>>    
>>
>
>Hm...  I think the current wisdom in TALES is to avoid python
>expressions if at all possible.
>
>--Guido van Rossum (home page: http://www.python.org/~guido/)
>
>  
>

There are many languages that use Python expressions and
that could benefit from the ".. if .. else .." clause. ZPT
is only an example. If to use Python expressions in ZPT
is against the current wisdom, this is probably not the
case with other languages.

I can remember an small example. The "Plural-Forms" header
of the PO files is expressed with a C expression, which
very often uses the ".. ? .. : .." clause. The current
implementation in the Python gettext module translates the
C expression to a Python expression with the help of a
"test" function. The code would be easier to understand
if Python had the ".. if .. else .." clause, because the
translation from the C to the Python expression would be
simpler, I think this is a good thing.


-- 
J. David Ib��ez, http://www.j-david.net
Software Engineer / Ing�nieur Logiciel / Ingeniero de Software