ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

Mitya Sirenef msirenef at lightbird.net
Tue Dec 11 19:59:00 EST 2012


On 12/11/2012 07:53 PM, Mitya Sirenef wrote:
> By the way, the Thesaurus class reminds me of using the old recipe
> called 'Bunch':
>
> http://code.activestate.com/recipes/52308-the-simple-but-handy-collector-of-a-bunch-of-named/ 
>
>
> like this:
>
> b = Bunch(x=1) b.stuff = Bunch(y=2)
>
> b.stuff.y 2 

Sorry, this was meant to be:

b = Bunch(x=1)
b.stuff = Bunch(y=2)

b.stuff.y
  2




More information about the Python-list mailing list