Global variable is undefined at the module level

Daiyue Weng daiyueweng at gmail.com
Tue Sep 13 06:42:33 EDT 2016


Hi, I defined a global variable in some function like this,

def some_function(self):

     global global_var

PyCharm inspection gave me,

Global variable is undefined at the module level

How to fix this?

cheers



More information about the Python-list mailing list