On Sun, 26 Feb 2012 23:24:31 -0800, John Salerno wrote: > Hi everyone. I created a custom class and had it inherit from the "dict" > class, and then I have an __init__ method like this:
> I know I could do self.variable = create() and that works fine, but I > thought it would be better (and cleaner) simply to use the instance > itself as the dictionary, rather than have to go through an instance > variable. Check out the "Bunch" class: http://code.activestate.com/recipes/52308/ HTH, Dan -- http://mail.python.org/mailman/listinfo/python-list