Skip to content

Subclassing not properly defined #382

Closed

Description

@tomekkosinski

if issubclass( Form, CustomForm ):
print('yeee')
else:
print('nope') # always here

It seems that tp_base of the inherited class is not set.

Activity

  1. pyscripter commented on Sep 30, 2022

    @pyscripter
    Collaborator

    Indeed, tp_base is never set. Is it important?

    Could be fixed in a couple of ways.

    1. RegisterDelphiWrapper should try to find the nearest parent class registered and set tp_base accordingly
    2. Implement __subclasshook__ in TPyDelphiObject
  2. pyscripter commented on Dec 27, 2022

    @pyscripter
    Collaborator

    @cosina Could you please confirm it is now working as expected?

  3. added a commit that references this issue on Jan 29, 2024
    a945a65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions