Python automatically passes the class instance as reference. (The self
argument which is seen in all class methods).
You could do:
def formatHeader(fn): def wrapped(self=None): return '<div class="page_header">'+fn(self)+'</div>' return wrapped
Python automatically passes the class instance as reference. (The self
argument which is seen in all class methods).
You could do:
def formatHeader(fn): def wrapped(self=None): return '<div class="page_header">'+fn(self)+'</div>' return wrapped
相关推荐