Why no list heritable type?

Jeff Shannon jeff at ccvcorp.com
Sat Dec 18 00:33:52 CET 2004

Mike Meyer wrote:

>Jeff Shannon <jeff at ccvcorp.com> writes:
>>Additionally, as I understand it UserList and UserDict are implemented
>>entirely in Python, which means that there can be significant
>>performance differences as well.
>Actually, UserList and UserDict are just wrappers around the builtin
>types. So the performance hit is one Python function call - pretty
>much neglible. But new code should still subclass the builtins.

Ah.  I suppose that makes sense, now that the builtins are 
subclassable.  Originally, they had to be implemented in Python in order 
to make them subclassable, but now the type/class unification has 
changed all that...

Jeff Shannon
Credit International

More information about the Python-list mailing list