Do pythons like sugar?

Afanasiy abelikov72 at hotmail.com
Thu Jan 9 07:54:24 EST 2003


On Thu, 9 Jan 2003 22:29:33 +1100, Andrew Bennetts
<andrew-pythonlist at puzzling.org> wrote:

>On Thu, Jan 09, 2003 at 10:47:13AM +0000, Afanasiy wrote:
>> On Thu, 09 Jan 2003 03:25:41 -0700, some Dalke wrote:
>> 
>> >Afanasiy wrote:
>> >>>A few languages provide syntax sugar for dealing with
>> >>>this by allowing you to localize the class scope.
>> >>>
>> >>>Does Python? eg. `with self do:`
>> >
>> >> So the answer is a definitive no? I want to do things as I have them,
>> >> I don't want to change my design just to be able to type 'self' less.
>> >
>> >It's a definite no.  From previous accounts, said sugar is hiding
>> >rat poison.  It's advantages are slight to its disadvantages.  Eg,
>> >for your case it would have hid a poor implementation rather than
>> >yield a better one.
>> 
>> You don't know what I am doing. My design is perfect.
>
>What is good design for one language isn't necessarily good design for
>another.  Python offers different features to, say, C++, and is best used in
>different ways.  I would recommend that you try to understand the pythonic
>world-view better, rather than insisting on imposing your preconceptions on
>us... my experience agrees with Andrew Dalke's; explicit self is much better
>than the alternatives.

If the "pythonic world-view" is that code which would look better with
implicit self is "poor implementation", then no, I do not agree with it.

Please note I am not complaining out about the lack of this possibility.
I only have a problem with the condescending tones. I guess it's normal.




More information about the Python-list mailing list