Why isn't Python switching from enclosing to local variable scope?

前端 未结 0 1275
礼貌的吻别
礼貌的吻别 2020-11-21 22:17

I was just checking my mental model about scoping in Python and got confused. The first two examples match my model, the 3rd example doesn\'t.

I assumed that Python h

相关标签:
回答
  • 消灭零回复
提交回复
热议问题