What about letting x.( ... ? ... ) be equivalent to ( ... x ... )
Steve Holden
steve at holdenweb.com
Sun Oct 9 06:26:23 EDT 2005
al wrote:
> 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.
It seems to me that what you proposed was a "solution", that seems
obvious only to you, to a problem perceived only by you.
I am afraid you would have to work rather harder to persuade me that
there is a problem, let alone that you have found the solution to it.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
More information about the Python-list
mailing list