摘要:
闭包 #F44336 内部函数用到了外部函数的自由变量,就形成了闭包 nonlocal语句 默认值的作用域 .__defaults__ 记录当前缺省值 __defaults__ 可以修改 不可变类型 += ,地址修改,覆盖 可变类型 +=,地址不变,就地修改 变量名解析原则LEGB #F44336 阅读全文
posted @ 2022-04-20 18:14
何时&明月
阅读(43)
评论(0)
推荐(0)
摘要:
标准库 datetime time datetime - datetime ⇒ timedelta datetime + - timedelta ⇒ datetime datetime + datetime ⇒ 错误 #F44336 列表解析式 [print("{}*{}={:<3}{}".form 阅读全文
posted @ 2022-04-20 18:05
何时&明月
阅读(44)
评论(0)
推荐(0)
摘要:
修改 pip 为国内源 pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ 或 pip config set global.index-url https://pypi.tuna.tsinghua.edu.c 阅读全文
posted @ 2022-04-20 18:03
何时&明月
阅读(33)
评论(0)
推荐(0)
摘要:
* 代表零个或任意个 阅读全文
posted @ 2022-04-20 15:19
何时&明月
阅读(19)
评论(0)
推荐(0)