Hi Paul,

On Mon, 28 Apr 2014 21:42:02 +0300
Paul Sokolovsky <pmis...@gmail.com> wrote:
> > 
> > Basically, if two classes have compatible layouts, you can inherit
> > from both at once.
> 
> How is "compatible layout" defined? Or "layout" for that matter at
> all?

See Guido's answer. I don't think it's documented anywhere, but you can
find the relevant code somewhere in Objects/typeobject.c (it's quite a
mouthful, though :-)).

(IIRC, "layout" is determined by tp_basicsize, tp_itemsize, the
number of __slots__, and other things perhaps)

Regards

Antoine.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to