Python's object model??

Spencer Yu (u8222015@cc.nctu.edu.tw)
14 Sep 1994 05:02:33 GMT

Would anybody explain Python's object model for me? I thought there is
some sort of metaclass..but now I found out thta it is not the case.
What is a class? What is self? what is a unbounded method?
I am trapped here:

class l0:
def say(self):
print 'this is layer0'
class l1(l0):
def say(self):
self.__class__.__bases__[0].say()
print 'this is layer1'
>>>i1=l1()
>>>i1.say()
ERROR:unbounded method...xxxxxxx......

so I modify blindly class l1 and define another class l2 as below:

class l1(l0):
def say(self):
self.__class__.__bases__[0].say(self)
print 'layer1' ^^^^^

class l2(l1):
def say(self):
self.__class__.__bases__[0].say(self)
print 'layer2'

>>>i1=l1()
>>>i2=l2()
>>i1.say()
this is layer0
layer1 it works

but calling i2.say() brings 'program terminate because error -xxx has occorred' (I am using a mac) and get me back to the OS.
somebody explain reason why?
a million thanks