python4delphi
python4delphi copied to clipboard
Subclassing not properly defined
if issubclass( Form, CustomForm ): print('yeee') else: print('nope') # always here
It seems that tp_base of the inherited class is not set.
Indeed, tp_base is never set. Is it important?
Could be fixed in a couple of ways.
- RegisterDelphiWrapper should try to find the nearest parent class registered and set tp_base accordingly
- Implement
__subclasshook__in TPyDelphiObject
@cosina Could you please confirm it is now working as expected?