On Thu, Jan 16, 2020, at 12:33, Mathias Enzensberger via Python-list wrote:
> Has anyone already done something like that? Is there some trick to 
> work around that issue, or is it simply not possible to inherit from 
> PyLongObject?

pure-python types that derive from int place __dict__ at the end of the object, 
I don't know if it's possible for you to do the same with the fields you intend 
to add (for some reason it isn't done with __slots__), but if all else fails 
you could do the same and store whatever data you need in the dict.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to