In Python, this code is valid:
class A: def __init__(me): me.foo = 17 def print_foo(myself): print(myself.foo) def set_foo(i,
This blog post from Guido van Rossum explains a little around the subject. Spesifically:
I see no reason with this proposal to make 'self' a reserved word or to require that the prefix name be exactly 'self'.
It is just a convention, and it is nice to stick with it.