Re: Help with Singleton SafeConfigParser

2012-12-08 Thread Mark Lawrence
On 08/12/2012 17:48, Josh English wrote: On Saturday, December 8, 2012 9:40:07 AM UTC-8, Peter Otten wrote: Two underscores trigger name mangling only in a class, not in a module. Don't try to hide the Options instance: # module config.py import ConfigParser class Options(ConfigParser.SafeC

Re: Help with Singleton SafeConfigParser

2012-12-08 Thread Josh English
On Saturday, December 8, 2012 9:40:07 AM UTC-8, Peter Otten wrote: > > > > Two underscores trigger name mangling only in a class, not in a module. > > Don't try to hide the Options instance: > > > > # module config.py > > import ConfigParser > > > > class Options(ConfigParser.SafeConfig

Re: Help with Singleton SafeConfigParser

2012-12-08 Thread Peter Otten
Josh English wrote: > I have seen older posts in this group that talk about using modules as singletons, but this, unless I misunderstand, requires me to code the entire API for SafeConfigParser in the module: > > > import ConfigParser > > > class Options(ConfigParser.SafeConfigParser): >