Re: The need to put "self" in every method
- From: Simon Brunning <simon.brunning@xxxxxxxxx>
- Date: Tue, 31 May 2005 17:37:48 +0100
On 31 May 2005 08:45:45 -0700, Fernando M.
<fernandomirandamuro@xxxxxxxxx> 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?
It doesn't need to be 'self'. You could use 'this', or 's', or whatever.
Of course, if you *don't* use 'self', you should expect an angly mob
with pitchforks and torches outside your castle.
--
Cheers,
Simon B,
simon@xxxxxxxxxxxxxxxxxx,
http://www.brunningonline.net/simon/blog/
.
- References:
- The need to put "self" in every method
- From: Fernando M.
- The need to put "self" in every method
- Prev by Date: Re: Seti-like program
- Next by Date: Re: The need to put "self" in every method
- Previous by thread: Re: The need to put "self" in every method
- Next by thread: Re: The need to put "self" in every method
- Index(es):
Relevant Pages
|
Loading