Hello, On Mon, 28 Apr 2014 12:08:40 -0700 Guido van Rossum <gu...@python.org> wrote:
[] > > How is "compatible layout" defined? Or "layout" for that matter at > > all? > > > > The layout is what the C struct defining the object looks like. These > are typically defined in headers in the Include directory (e.g. > listobject.h). > > The definition of compatible layout is defined by the C code that > gives the error message when it's incompatible. Sorry, I don't recall > exactly where that is, so I recommend that you just look at CPython's > source tree. (I know you have a personal desire not to look at > CPython, but I can't help you without referring to it anyway.) Well, sure I did, as I mentioned, but as that's first time I see that code (that specific piece is in typeobject.c:extra_ivars()), it would take quite some time be sure I understand all aspects of it. Thanks for confirming that it's governed essentially by CPython implementation details and not some language-level semantics like metaclasses (I mentioned them because error message in Python2 did so, though Python3 doesn't refer to metaclasses). An example would really help me to get a feel of the issue, but I assume lack of them means that there's no well-known idiom where such inheritance is used, and that's good enough on its own. I also tried to figure how it's important to support such multi-base cases, so the code I write didn't require complete rewrite if it hits one day, but everything seems to turn out to be pretty extensible. > > -- > --Guido van Rossum (python.org/~guido) Thanks! -- Best regards, Paul mailto:pmis...@gmail.com _______________________________________________ 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