"self" in a class is annoying and errorprone

Jeremy Hylton jeremy at zope.com
Wed Feb 12 14:13:12 EST 2003


On Wed, 12 Feb 2003 18:47:31 GMT
 Michael Hudson <mwh at python.net> wrote:
> Afanasiy <abelikov72 at hotmail.com> writes:
> > It makes me wonder if I want a language whose core
> features
> > and design additions are first selected for their ease.
> 
> Feel free to choose another!  But I think you're making a
> bogus
> characterization.  There is a correlation between
> 
>     easy to implement
> 
> and 
> 
>     easy to understand
> 
> but I think you're been a bit unfair.

I think the FAQ entry underplays the design issues that go
into self.  I think the key criterion is not the
implementation ease, but the syntactic issue of
distinguishing local variable assignment from instance
variable assignment.  Python's only got one declaration --
the global statement -- and a lot of language design issues
result from the lack of any other declarations.

Jeremy





More information about the Python-list mailing list