[Python-Dev] Re: [Python-checkins] python/dist/src/Lib/bsddb __init__.py, 1.11, 1.12

Gregory P. Smith greg at electricrain.com
Wed Nov 5 00:51:05 EST 2003


On Mon, Nov 03, 2003 at 09:42:31AM -0600, Skip Montanaro wrote:
> 
>     greg>   import UserDict
>     greg>   class _iter_mixin(UserDict.DictMixin):
>     greg>       def __iter__(self):
>     greg>           try:
>     ...
> 
> Should _iter_mixin inherit from dict, or is there a backward compatibility
> issue?

Simply changing UserDict.DictMixin to dict doesn't work.  In order to act
like a dictionary it depends on DictMixin's multi-level implementation
of all of the dict methods using the lower-level primitives.




More information about the Python-Dev mailing list