Attack a sacred Python Cow

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Fri Jul 25 06:33:51 CEST 2008


In message
<8233fbfb-ad9b-43ef-b722-9738ef129d0b at q5g2000prf.googlegroups.com>, Jordan
wrote:

> On Jul 24, 8:01 pm, Lawrence D'Oliveiro <l... at geek-
> central.gen.new_zealand> wrote:
>
>> In message
>> <52404933-ce08-4dc1-a558-935bbbae7... at r35g2000prm.googlegroups.com>,
>> Jordan wrote:
>>
>> > Except when it comes to Classes. I added some classes to code that had
>> > previously just been functions, and you know what I did - or rather,
>> > forgot to do? Put in the 'self'. In front of some of the variable
>> > accesses, but more noticably, at the start of *every single method
>> > argument list.*
>>
>> The reason is quite simple. Python is not truly an "object-oriented"
>> language. It's sufficiently close to fool those accustomed to OO ways of
>> doing things, but it doesn't force you to do things that way. You still
>> have the choice. An implicit "self" would take away that choice.
> 
> You could still explicitly request non-implicit self on a method by
> method basis.

That would mean making OO the default. Which Python doesn't do.



More information about the Python-list mailing list