ConfigParser shootout, preliminary entry
fuzzyman at gmail.com
Mon Oct 18 23:49:00 CEST 2004
mcherm at mcherm.com (Michael Chermside) wrote in message news:<1c339f13.0410181021.4041daa2 at posting.google.com>...
> Anyway... I certainly think that the matter is less than clear-cut, but
> in my opinion, this is one of those areas where it's worth having a
> little well-bounded "magic" to make the code that much more readable.
> -- Michael Chermside
Of course the good thing about python is that doing both is easy.
Using __setattr__ and sublassing dict will provide both methods with
I subclass caselessDict to get a case insensitive dictionary access -
but have been thinking about adding attributes - with a little magic
to avoid overriding any existing methods/attributes. (Just do a
dir(config) on an empty config object and that is the list of reserved
More information about the Python-list