Daiyue Weng wrote: > 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
There is no single way to silence that complaint and actually improve your code; you have to provide some context: Why do you need a global at all, why can't you (or don't want to) bind it on the module level etc. -- https://mail.python.org/mailman/listinfo/python-list