03 2021 档案
摘要:python装饰器就是用于拓展原来函数功能的一种函数,这个函数的特殊之处在于它的返回值也是一个函数,使用python装饰器的好处就是在不用更改原函数的代码前提下给函数增加新的功能。 def test(a_func): def test_old(): print("I am 开始") a_func()
阅读全文
摘要:可以使用豆瓣源: http://pypi.douban.com/simple --trusted-host pypi.douban.com。命令如下: python -m pip install --upgrade pip -ihttp://pypi.douban.com/simple --trus
阅读全文

浙公网安备 33010602011771号