[Python-Dev] Multiple inheritance from builtin (C) types [still] supported in Python3?

Antoine Pitrou solipsis at pitrou.net
Mon Apr 28 20:24:58 CEST 2014


On Mon, 28 Apr 2014 20:45:48 +0300
Paul Sokolovsky <pmiscml at gmail.com> wrote:
> 
> So, is that it, or disjoint native types are supported as bases
> somehow? Also, would someone know if a class-subclass case happens for
> example in stdlib?

Well, for instance this trivial example works:

>>> class C(list, object): pass
... 
>>> 

Basically, if two classes have compatible layouts, you can inherit from
both at once.

Regards

Antoine.




More information about the Python-Dev mailing list