reason/history of self

gabor farkas xlat at pobox.sk
Wed Jan 16 13:46:44 CET 2002


what was the name of that thread?

i could only find the thread "History of 'self' and why not at least 'my'?" 
but there they talk about the problem that in a method you have to write 
"self." to access a local variable... 

i'm talking about having to write self in the method definition like in "def 
mymethod(self)"...

thanks,
gabor


On Wednesday 16 January 2002 22:20, Giorgi Lekishvili wrote:
> Yeah, this discussion had place just 1 week ago, on 9.01.02.
>
> Grtz,
> Giorgi
>
> gabor farkas wrote:
> > hi,
> >
> > i'm sure this was discussed before, but i cant find it..
> >
> > why do i have to write self as the first parameter of a method in the
> > method-definition?
> >
> > class......
> >         def method(self):  <- here
> >                 ....
> >                 ..
> >
> > it seems to me as unnecessary, because i have to write it everytime..
> >
> > bye,
> > gabor




More information about the Python-list mailing list