Proposal for removing self
Raymond Hettinger
python at rcn.com
Thu Aug 26 02:01:12 EDT 2004
"Brent W. Hughes" <brent.hughes at comcast.net> wrote in message news:<T_7Xc.61360$Fg5.2281 at attbi_s53>...
> When doing object-oriented stuff, it bothers me to have to type "self" so
> many times. I propose that Python allow the programmer to optionally type
> ".variable" instead of "self.variable" to mean the same thing. Of course,
> the interpreter would have to be more careful about detecting floats that
> begin with just a period as in ".5". What are your thoughts?
There's a FAQ on the subject:
http://www.python.org/doc/faq/general.html#why-must-self-be-used-explicitly-in-method-definitions-and-calls
Raymond Hettinger
More information about the Python-list
mailing list