装饰器¶
目录
装饰器的本质是什么?¶
Remember, that the @decorator syntax is just syntactic sugar; the syntax:
@property
def foo(self):
return self._foo
really means the same thing as
def foo(self):
return self._foo
foo = property(foo)
目录
Remember, that the @decorator syntax is just syntactic sugar; the syntax:
@property
def foo(self):
return self._foo
really means the same thing as
def foo(self):
return self._foo
foo = property(foo)