[Tutor] why "self" in methods?

Alan Gauld alan.gauld at blueyonder.co.uk
Mon Apr 5 13:12:21 EDT 2004

Hi Goncalo,

>>automatically take the parameter self...  that they can be created
>>not used doesn't seem very Pythonic :)
> That's a problem of the programmer, not of the language right?

Not if the compiler can detect the error....

> Also, about the self controversy, think about nested definitions
> of classes. You get into trouble with the implicit self thingy.

Really? How so? Surely that's merely a matter of scoping.
I agree that self being explicit is "a good thing" but
it is not necessary, other languages seem to manage quite
well without it.

Alan G

More information about the Tutor mailing list