shulanxt.com/database/mysqlvideo/p70
特殊方法:
class Foo:
def__init__ (self,name) :
self .name = name
def show(self) :
print (self.name)
def__call__(self):
pass
def__getitem__(self, key) :
pass
def__setitem__(self,key,value) :
pass
def__delitem__(self, key) :
pass
obj1 = Foo('eric')
obi1()
obj1['k']
obj1['k'] = 123
del obj[k]
obj.__dict__
Call?对象后面可以加( 括号)