Global variables from a class

Kless jonas.esp at
Fri May 29 11:34:53 CEST 2009

I usually use a class to access to global variables. So, which would
be the correct way to set them --since the following classes--:

class Foo:
   var = 'lala'

class Bar:
   def __init__(self):
      self.var = 'lele'

Or is it the same?

More information about the Python-list mailing list