On Tuesday 11 December 2012 03:12:19 Steven D'Aprano wrote: > Is this intended as a ready-for-production class?
For me, yes. In production code. > py> d = Thesaurus() > py> d['spam'] = {} Maybe because spam is type dict instead of type thes??? >>> import thesaurus >>> thes = thesaurus.Thesaurus >>> t = thes() >>> t.spam = thes() >>> t.spam.ham = 'cheese' >>> print t.spam.ham >cheese >>> print t['spam'].ham >cheese >>> print t['spam']['ham'] >cheese >>> '%(spam.ham)s' % t >'cheese' Works for me! Remainder of your post, not productive, not worth my time. Dave -- http://mail.python.org/mailman/listinfo/python-list