Re: The need to put "self" in every method



Fernando M. wrote:
i was just wondering about the need to put "self" as the first
parameter in every method a class has because, if it's always needed,
why the obligation to write it? couldn't it be implicit?

py> import this The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
....


STeVe .



Relevant Pages

  • Re: The need to put "self" in every method
    ... Fernando M. wrote: ... parameter in every method a class has because, if it's always needed, why the obligation to write it? ... couldn't it be implicit? ...
    (comp.lang.python)
  • Re: The need to put "self" in every method
    ... Fernando M. schrieb: ... parameter in every method a class has because, if it's always needed, why the obligation to write it? ... couldn't it be implicit? ...
    (comp.lang.python)
  • Re: The need to put "self" in every method
    ... parameter in every method a class has because, if it's always needed, why the obligation to write it? ... couldn't it be implicit? ... Or is it a special reason for this being this way? ... incompabible change affecting almost every script in existance. ...
    (comp.lang.python)
  • Re: feliz navidad...pc style?
    ... > Please accept with No Obligation, implied or implicit, my best wishes ... Regards ... at tpg dot com dot au ...
    (alt.usage.english)
  • The need to put "self" in every method
    ... why the obligation to write it? ... couldn't it be implicit? ... Or is it a special reason for this being this way? ... Prev by Date: ...
    (comp.lang.python)