摘要:
内层函数没有引用外层函数局部变量,dir()是不会显示的 def b(a): def p(): print('function p dir ->',dir()) p() print('function b dir ->',dir()) b(2) def b(a): def p(): nonlocal 阅读全文
posted @ 2020-11-11 14:50
ascertain
阅读(169)
评论(0)
推荐(0)
摘要:
只加强一次功能的装饰器: print('/\\') print('/\ta') def b(fn): def wrapper(): print('bbbbb') return fn return wrapper() @b def p(): print(111111111) print(p) p() 阅读全文
posted @ 2020-11-11 14:38
ascertain
阅读(80)
评论(0)
推荐(0)

浙公网安备 33010602011771号