Decorator函数报错,【 del add_flower(house_func):】SyntaxError: invalid syntax 谢谢!
decorator报错:不知道什么原因,提示是语法错误,找了好久都没想明白,大侠帮忙看下。
''' Created on 2016/7/1 UTF-8 @author: love ''' del add_flower(house_func): del rose(): return house_func()+" beautiful rose" return rose() @add_flower del house(): return "A big house" print(house())