标签:print name elf ret __init__ ini int init tac
def deco(function):
print ‘i am in deco‘
return function
class MetaClass(type):
def __init__(cls,name,bases,attr):
print ‘i am in MetaClass‘
class Home(object):
__metaclass__ = MetaClass
@deco
def index(self):
print ‘i am in index‘
Home()
# i am in deco
# i am in MetaClass
标签:print name elf ret __init__ ini int init tac
原文地址:http://www.cnblogs.com/chaleaoch/p/7324856.html