"self" in a class is annoying and errorprone

Michael Hudson mwh at python.net
Wed Feb 12 19:47:31 CET 2003

Afanasiy <abelikov72 at hotmail.com> writes:

> I agree, but the FAQ says it was easier to do it this way.
> This same reason shows itself in other Python decisions.

Such as?

> http://www.python.org/cgi-bin/faqw.py?req=show&file=faq06.007.htp
> I personally do not agree with it, but the FAQ does try
> to convince us, and the author?, it was a good choice,
> even if it was selected for the creator's ease.

If you think the only benefits of the explicit self are ease of
implementation, you haven't been programming in Python long enough.

> 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


    easy to understand

but I think you're been a bit unfair.


  Two things I learned for sure during a particularly intense acid
  trip in my own lost youth: (1) everything is a trivial special case
  of something else; and, (2) death is a bunch of blue spheres.
                                             -- Tim Peters, 1 May 1998

More information about the Python-list mailing list