Skip to content

_wrapInstance pointer type assert message in Py3 #362

Open
@YKdvd

Description

@YKdvd

Qt.py checks whether "long" is defined, and if it isn't (for Python 3.x) defines it as "int". The _wrapinstance() function has an assertion to ensure that the 'ptr' parameter passed is of this type. But the assertion message uses a hardcoded '' phrase, so on Python 3 seems to be saying that the parameter should be of the nonexistent "long" type.

Qt.py/Qt.py

Line 768 in 54cbcbf

assert isinstance(ptr, long), "Argument 'ptr' must be of type <long>"

Should this message use something like "long.__name__" instead so it more accurately print "long" on Python 2 and "int" on Python 3?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions