"self" in a class is annoying and errorprone

laotseu bdesth at removethis.free.fr
Wed Feb 12 23:27:21 EST 2003


Meinrad Recheis wrote:
> hello everyone,
> 
> I think it must be possible to change python so that self can be omitted 
> inside a class
>     # except for some reasons like this:
>     __init__(""" i dont like this self """ self, x)
>         self.x = x    # here self is useful
>     
> 
> self is simply annoying.
> (why allways need self as first parameter?? the interpreter could mask 
> that for us)

Du goudron et des plumes ! vite !

> self is prone to be forgotten!!
> leads to potential scope errors

Arf ! Got you, evil troll ! This one is hairy enough to kill the thread 
right now :

DONT FEED THE TROLL !

Laotseu





More information about the Python-list mailing list