Re: Why the 'self' argument?
"Harri Pesonen" <fuerte@sci.f i> wrote in message
news:Ucp6b.3992 $ZB4.3874@reade r1.news.jippii. net...[color=blue]
> I agree, it's not logical.[/color]
Do my previous two responses today make the logic any clearer?
[color=blue]
> I'm learning Python at the moment, and like it very much.[/color]
Try learning this. Class K method attribute f with params (s, *rest)
can be called as K.f(Kinst, *rest), consistent with all other function
calls.
Abbreviation Kinst.f(*rest) makes the call look inconsistent by making
K inplicit (and moving Kinst), but the same inplicitness enables
runtime method lookup and superclass inheritance. I think the
benefits that following are worth the minor bump in one's learning
curve.
Terry J. Reedy
"Harri Pesonen" <fuerte@sci.f i> wrote in message
news:Ucp6b.3992 $ZB4.3874@reade r1.news.jippii. net...[color=blue]
> I agree, it's not logical.[/color]
Do my previous two responses today make the logic any clearer?
[color=blue]
> I'm learning Python at the moment, and like it very much.[/color]
Try learning this. Class K method attribute f with params (s, *rest)
can be called as K.f(Kinst, *rest), consistent with all other function
calls.
Abbreviation Kinst.f(*rest) makes the call look inconsistent by making
K inplicit (and moving Kinst), but the same inplicitness enables
runtime method lookup and superclass inheritance. I think the
benefits that following are worth the minor bump in one's learning
curve.
Terry J. Reedy
Comment