Ronn Ross wrote:
How do you define a global variable in a class. I tried this with do success:You need pass "self" to the function and "global_var" needs be called with self.class ClassName: global_var = 1def some_methos():print global_varThis doesn't work. What am I doing wrong?
class ClassName: global_var = 1def some_methos(self):
print self.global_var Gabriel M. Monnerat -- http://mail.python.org/mailman/listinfo/python-list