python技术-装饰器

摘要: 一、闭包 1、闭包的概念 闭包函数必须返回一个函数对象 闭包函数返回的函数必须应用外部变量 2、示例 1 def f1(a, b): 2 def f2(x): 3 return a*x+b 4 return f2 5 6 7 test1 = f1(2, 1) 8 test2 = f1(3, 2) 9 阅读全文
posted @ 2021-04-02 10:24 Verckolf 阅读(46) 评论(0) 推荐(0)

python pip 报错ReadTimeout

摘要: 问题:python pip 报错 ReadTimeout 原因:大概率是被QJ了,需要换成清华源。 解决方法: 1)C:\Users\Administrator\下新建pip文件夹 2)创建pip.ini,内容为 [global] index-url = https://pypi.tuna.tsin 阅读全文
posted @ 2019-09-20 23:13 Verckolf 阅读(339) 评论(0) 推荐(0)