"self" - a python wart or "feature"
Alex Martelli
aleaxit at yahoo.com
Tue Feb 18 06:14:00 EST 2003
Cere Davis wrote:
...
> def stuff(self, x=5):
...
> What I wish for - but am not sure if it's possible - is that the
> function "stuff" could just be declared as"def stuff(x=5)".
It's definitely POSSIBLE, it's just not part of the Python language
(and I trust it never will be). There are many other programming
languages in the world, and if you dislike so deeply one of the key
design choices that make Python simple and powerful at the same
time (i.e., NO black magic of this horrid sort), I urge you to go
study those other languages, rather than post here.
Alex
More information about the Python-list
mailing list