Global variables from a class

Kless jonas.esp at googlemail.com
Fri May 29 05:34:53 EDT 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