[Python-Dev] UserDict in 2.7

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Jun 23 01:03:06 CEST 2010


Benjamin Peterson wrote:

> IIRC this was because UserDict tries to be a MutableMapping but abcs
> require new style classes.

Are there any use cases for UserList and UserDict in new
code, now that list and dict can be subclassed?

If not, I don't think it would be a big problem if they
were left out of the ABC ecosystem. No worse than what
happens to any other existing user-defined class that
predates ABCs -- if people want them to inherit from
ABCs, they have to update their code. In this case, the
update would consist of changing subclasses to inherit
from list or dict instead.

-- 
Greg


More information about the Python-Dev mailing list