Why the 'self' argument?

Grant Edwards grante at visi.com
Fri Sep 5 17:55:34 CEST 2003


In article <vlhba85atlte07 at news.supernews.com>, John Roth wrote:
> 
> "Grant Edwards" <grante at visi.com> wrote in message
> news:3f58a2bd$0$156$a1866201 at newsreader.visi.com...
>> In article <vlh7otscuo8gb1 at news.supernews.com>, John Roth wrote:
>>
>> > Technically, it would be possible to make "self" a reserved
>> > word, and not have to put it in the method declaration.
>> > However, there are a lot of people who use something other than
>> > the word "self," so that would break existing code.
>>
>> It would also make the language more complex and irregular.
> 
> How?

 1) It would add a reserved word.

 2) It would mean that there's some sort of difference between
    a function and a method.

-- 
Grant Edwards                   grante             Yow!  I have a TINY BOWL in
                                  at               my HEAD
                               visi.com            




More information about the Python-list mailing list