【发布时间】:2018-06-30 05:35:09
【问题描述】:
它有点像这样。它只是主要代码的一个块。 x, y 定义正确
def Function_1 (x,y):
global zone
# there are some conditions which get the value of variable zone
return zone
def Function_2 (zone):
#then there are some conditions wherein i use variable zone
Function_2 (zone)
所以错误是第 32 行中的“未定义区域” 很抱歉问了一个愚蠢的问题,但我是新手,我非常需要帮助
【问题讨论】:
-
@cᴏʟᴅsᴘᴇᴇᴅ 为什么你认为这不是代码
-
在你修复它之前它不是代码。
-
@cᴏʟᴅsᴘᴇᴇᴅ 抱歉打扰了,但请您帮帮我
-
仔细检查第 32 行发生了什么 - 错误消息表明您在分配区域之前正在使用它。
标签: python function variables arguments global