水木社区手机版
首页
|版面-Python的自由天空(Python)|
新版wap站已上线
展开
|
楼主
|
同主题展开
|
溯源
|
返回
上一篇
|
下一篇
|
同主题上篇
|
同主题下篇
主题:Re: 大佬,为何我的py函数中,找不到t这个变量?
feng321
|
2023-03-12 18:45:33
|
懂了,谢谢,在外面赋值的变量,函数里面可以print——不报错的前提是,print后面没有调用该变量的语句。谢谢
https://docs.python.org/3/faq/programming.html#faq-unboundlocalerror
【 在 ToSimplicity 的大作中提到: 】
:
https://docs.python.org/3/reference/executionmodel.html#resolution-of-names
:
https://docs.python.org/3/faq/programming.html#faq-unboundlocalerror
--
FROM 120.242.253.*
上一篇
|
下一篇
|
同主题上篇
|
同主题下篇
选择讨论区
首页
|
分区
|
热推
BYR-Team
©
2010.
KBS Dev-Team
©
2011
登录完整版