On Mar 5, 10:00 pm, [EMAIL PROTECTED] wrote: > Rather new to OOP in Python... > > I'm writing an app where several objects need to access and change the > state of ONE instance. > > I could of course instantiate the instance and then pass it along the > objects, but that's cumbersome, especially as it would need to be > "passed through" classes that don't really need it. > > I would be happy if I could just instantiate the object in the main > module and declare it global, but classes are in different modules so > I guess that won't work. > > Have looked a bit into singletons -- is that the way to go?
Put your 'global' stuff into a module and use import? -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list