Deprecate self
David C. Ullrich
ullrich at math.okstate.edu
Wed Apr 18 11:50:23 EDT 2001
On Wed, 18 Apr 2001 10:59:09 +0200, "Alex Martelli"
<aleaxit at yahoo.com> wrote:
>"Dave LeBlanc" <whisper at oz.net> wrote in message
>news:9bji5k$417$0 at 216.39.170.247...
>> Since self is used for every method of every class, isn't it a bit
>> redundant?
>
>Not really. Explicit is better than implicit.
>
>> I don't know of another OO language that makes you manually
>> carry around the "this"/"self" pointer/reference...
>
>Modula-3, for example (I believe 'self' is a reserved word
>there; in Python, it's "just" a 'universal' convention).
Almost universal. I was surprised at first to see some guy's
def __add__(x,y):
return something_involving(x,y);
looked at first like he wasn't aware of this universal convention.
Then I decided that in the sort of context where this was used
his notation made a lot more sense.
(And of course an implicit self makes less sense than anything
here...)
More information about the Python-list
mailing list