Scott David Daniels wrote:
> Dustan wrote:
> 
>> .... From my experience, the methods are passed
>> down, not referred to from the parent. That is, Parent does have its
>> own critique method, not a reference to Grand_parent.critique(). 
> 
> This is typical of static binding as (for example) seen in C++.  If you
> think of dynamically bound systems like Smalltalk, Ruby, and Python, the
> more unusual case is wanting to go up the hierarchy (where you use super
> to get the behavior you are apparently expecting).  Think of Python's
> method dispatch as always being "virtual".

Ah. Not only that, but the other ingredient (I think) is to keep in mind 
that you're always calling instance methods via the self object -- and 
that self object is always the same object regardless of how far up the 
inheritance tree you go with those method calls, right?

> --Scott David Daniels
> [EMAIL PROTECTED]

---J
-- 
(remove zeez if demunging email address)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to