Lawrence D'Oliveiro a écrit :
In message
<[EMAIL PROTECTED]>, 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.
Oh yes ? What's missing exactly ? You have objects that have an id,
state and behaviour, and you have a message-passing mechanism.
You meant "Python is not truly a mainstream class-based language", I think.
It's sufficiently close to fool those accustomed to OO ways of
doing things,
s/OO/class-based/
but it doesn't force you to do things that way. You still
have the choice. An implicit "self" would take away that choice.
It's not even a question of OO/non-OO. An implicit "self" would take
away some things that makes Python's *object* model so powerful.
--
http://mail.python.org/mailman/listinfo/python-list