My understanding of how tp_bases/tp_base is utilized is that it takes the best 
type object to fill tp_base.
But thinking about it now, another issue about offsets that is derived from 
CPython as it stands.

C based types + objects aren't inheritance friendly as it stands, more 
specifically, they're only really usable as the LAST base type in a base tuple, 
this offset system can be redone to make it more friendly, but as it stands, it 
mimics the existing behaviour fluently.

The one-way conversion is only if you discard the initial "PyObject *" stack 
variable as it contains the runtime type of the object.
This is a problem for if the runtime type is not the C based type object BUT a 
PEP accepted for Python 3.9 lays the framework that solves this issue.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/LUVVHOVSSTBSQUB24H7COH3ZWV23KO65/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to