should "self" be changed?
Mark Lawrence
breamoreboy at yahoo.co.uk
Tue May 26 13:28:11 EDT 2015
On 26/05/2015 17:37, zipher wrote:
> Would it be prudent to rid the long-standing "argument" (pun unintended) about self and the ulterior spellings of it, by changing it into a symbol rather than a name?
>
> Something like:
>
> class MyClass(object):
>
> def __init__(@):
> @.dummy = None
>
> OR, even better, getting *rid of it* in the parameter list, so it stops confusing people about how many parameters a method needs, and transform it into a true *operator*.
>
> class MyClass(object):
>
> def __init__(): #takes no arguments!
> @.dummy = None #the @ invokes the class object's dictionary
>
> That would seem to be a nice solution to the problem, really. It doesn't become PERLish because you've made it into a genuine operator -- "self" was always a non-variable that looked like a variable and hence created an itch that couldn't be scratched.
>
> Anyone else have any thoughts?
>
> --mark
>
Yes, how about you taking a permanent holiday rather than bother this
list with more of your nonsense?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
More information about the Python-list
mailing list