You could do something like this: >>> class MyDict(dict): ... pass >>> bananna = MyDict({"foo":"bar"}) #dict constructor still works >>> bananna.name = "bananna" >>> bananna.name 'bananna' >>> bananna {'foo': 'bar'}
Or, you could also just do this: >>> bananna = {"name":"bananna"} Depending on what you actually want to use it for the best solution is to use the id instead of a name though. -Matt -- http://mail.python.org/mailman/listinfo/python-list