[Types-sig] method binding

Edward Welbourne Edward Welbourne <eddyw@lsl.co.uk>
Tue, 8 Dec 1998 13:57:05 GMT


Hmm.  I think the important bit of all that was:

There is a difference between
   that object uses this one as a `base'
   that object uses this one as a `class'

In the first case, that one asks this one for an attribute on exactly
the same terms as it was, itself, asked for an attribute.

In the second, the instance asks its class to `work out' the attribute
for it and the class may well do some fancy things (like binding) in the
process of filling the request.  In particular, the class may do `first
type' attribute lookup `on itself' to get the thing it uses to build the
attribute it contributes to the instance.  For these purposes, there
doesn't really seem to be any fundamental difference between an object's
class and the object.__getattr__() method.

So we really need *two* kinds of `get attribute' functionality:
    plain raw `get my attribute'
    build attribute `for my instance'

But now to wait for all those huge brains to assimilate my little
tuppence worth ;^)

	Eddy.