extending the built in dictionary type

Alex Martelli aleaxit at yahoo.com
Fri Mar 23 07:43:30 CET 2001

"Steve Holden" <sholden at holdenweb.com> wrote in message
news:YJzu6.12928$_46.482847 at e420r-atl2.usenetserver.com...
> Look in the library and inherit from UserDict. A search on UserDict
> that this probably isn't quite as FAQtually recorded as it might be.

Or else, as for any other built-in object, use the "automatic delegation
in lieu of inheritance" pattern.  But, from context, it seems Robin is
trying to extend dictionaries _in a C-coded extension_, which is a
whole 'nother ball of wax...:

> > Seems that although it exists I can't chain the original mapp_methods of
> > dictobject as that is not visible outside pythonxx.dll. So is there an
> > easier way to get at these internal types?


More information about the Python-list mailing list