Subclassing Python's dict
contact at xavierho.com
Wed Aug 5 16:32:15 CEST 2009
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.
Also, the ABC MutableMapping might be of your interest.
> Another guy have reported me that he experiences similar problems with
> subclassing builtin 'list'.
Similarly, UserList is what you should subclass.
Ching-Yun "Xavier" Ho, Technical Artist
Mobile: (+61) 04 3335 4748
Skype ID: SpaXe85
Email: contact at xavierho.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list