python函数装饰器
摘要:
装饰器(Decorators)是Python的一个重要部分。简单地说:他们是修改其它函数的功能的函数。他们有助于让我们的代码更简短,也更Pythonic。 一切皆对象 我们可以将一个函数赋值给一个变量 def hi(): print("hihi") a=hi print(a,type(a)) hi( 阅读全文
posted @ 2020-08-02 22:54 星空6 阅读(252) 评论(0) 推荐(0)
posted @ 2020-08-02 22:54 星空6 阅读(252) 评论(0) 推荐(0)
posted @ 2020-08-02 15:26 星空6 阅读(572) 评论(0) 推荐(0)
posted @ 2020-08-02 12:30 星空6 阅读(487) 评论(0) 推荐(1)
posted @ 2020-08-02 11:44 星空6 阅读(476) 评论(0) 推荐(0)
posted @ 2020-08-02 11:03 星空6 阅读(544) 评论(0) 推荐(0)
posted @ 2020-08-02 09:31 星空6 阅读(573) 评论(0) 推荐(0)