Subclassing Python's dict

Joshua Kugler joshua at joshuakugler.com
Wed Aug 5 15:23:31 EDT 2009


Xavier Ho wrote:

> On Thu, Aug 6, 2009 at 11:51 AM, Sergey Simonenko
> <gforgx at lavabit.com>wrote:
> 
>> I subclass builtin 'dict' in my application and experience some problems
>> with it.
>>
> 
> You should subclass collections.UserDict, and not the default dict class.
> Refer to the collections module.

Are you referring to Python 3.0?  Python 2.6 does not have
collections.UserDict

j





More information about the Python-list mailing list