What about letting x.( ... ? ... ) be equivalent to ( ... x ... )
al
al at none.fr
Sun Oct 9 05:49:36 EDT 2005
Fredrik Lundh a écrit :
> if you have a fear of introducing new local variables, you have problems
> that cannot be solved by syntax.
Dear Fredrik,
I have read the original messages on fr.comp.lang.python, and I don't
understand your answer.
It is not about a fear of introducing new local variables, but for me it
is an elegant solution to a common problem, to avoid creation of useless
variables (what in french we call "variables muettes", like indexes in
loops who are just there because some langages level is too low).
It also avoid the increase of parenthesis depth, and so the readability
is enhanced.
And it solve a problem that in all object oriented langages, a method
that process 2 or more different classes of objets belongs just to one
of those classes.
All this kind of problems appears often to me (and in different
langages), and contrarily to you, I'm very impressed by the compacity
and elegance of the solution. I think it would be nice if implemented in
different langages (because it breaks nothing), and firstly Python.
Best regards,
Al
PS : sorry for my approximative english, but my natural langage is french.
More information about the Python-list
mailing list