How can I make two decorators in Python that would do the following? 如何在Python中制做两个装饰器,以完成如下工做? app
@makebold @makeitalic def say(): return "Hello"
...which should return: ...应返回: this
"<b><i>Hello</i></b>"
I'm not trying to make HTML
this way in a real application - just trying to understand how decorators and decorator chaining works. 我并非想在真实的应用程序中以这种方式制做HTML
,而是试图了解装饰器和装饰器连接的工做方式。 spa