A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-April/134367.html below:

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

[Python-Dev] Multiple inheritance from builtin (C) types [still] supported in Python3?Antoine Pitrou solipsis at pitrou.net
Mon Apr 28 21:02:24 CEST 2014
Hi Paul,

On Mon, 28 Apr 2014 21:42:02 +0300
Paul Sokolovsky <pmiscml at 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.
More information about the Python-Dev mailing list

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