A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20140428/cfcf411c/attachment.html below:

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 28, 2014 at 12:02 PM, Antoine Pitrou <span dir="ltr"><<a href="mailto:solipsis@pitrou.net" target="_blank">solipsis@pitrou.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><div class="">


On Mon, 28 Apr 2014 21:42:02 +0300<br>
Paul Sokolovsky <<a href="mailto:pmiscml@gmail.com">pmiscml@gmail.com</a>> wrote:<br>
> ><br>
> > Basically, if two classes have compatible layouts, you can inherit<br>
> > from both at once.<br>
><br>
> How is "compatible layout" defined? Or "layout" for that matter at<br>
> all?<br>
<br>
</div>See Guido's answer. I don't think it's documented anywhere, but you can<br>
find the relevant code somewhere in Objects/typeobject.c (it's quite a<br>
mouthful, though :-)).<br>
<br>
(IIRC, "layout" is determined by tp_basicsize, tp_itemsize, the<br>
number of __slots__, and other things perhaps)<br clear="all"></blockquote><div><br></div><div>IIRC the actual inheritance pattern also goes into it. Two structs that each add an identical new field to a common base class's struct should *not* be considered compatible. <br>

</div></div><br>-- <br>--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)


</div></div>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4