Self Nanny

Clarence Gardner clarence at netlojix.com
Mon Mar 6 10:53:04 EST 2000


On Mon, 06 Mar 2000, Gaetan Corneau wrote:
>Ah, c'mon guys: having to declare self may or may not be fun, but the fact
>is that it is a gotcha for newbies, so I think self should be passed
>implicitly to methods.
>
>Remember: it's stuff like that that turns new users off.

I wonder if you have actual evidence of that point.  One of my biggest
problems with C++ is the inability to distinguish between an attribute and
a local variable at a glance.  I would guess C++ newbies have as many
problems.  Especially when they get into the situations where they have to
start explicitly using 'this'.

In fact, in a posting in this newsgroup a while back, someone said they
actually have a standard practice of *always* referring to attributes via
*this, just to avoid the confusion and inconsistency.

Three years ago, as a long-time programmer but brand new to Python, I
applauded the Python approach.

--
Clarence Gardner
Software Engineer
NetLojix Communications
clarence at netlojix.com



More information about the Python-list mailing list