Skip to content

isinstance doesn't work with interfaces #51

@tonyroberts

Description

@tonyroberts

eg

from System import String, IComparable
s = String("")

# doesn't work
isinstance(s, IComparable)
>> False

# works
s.GetType().GetInterface("IComparable")
>> <System.RuntimeType at 0xaccb048>

I think it just needs tp_bases to be set in the typemanager instead of tp_base.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions