Qt.py icon indicating copy to clipboard operation
Qt.py copied to clipboard

_wrapInstance pointer type assert message in Py3

Open YKdvd opened this issue 2 years ago • 1 comments

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. https://github.com/mottosso/Qt.py/blob/54cbcbf51c621fea0074f9bb26af5c55862d57fd/Qt.py#L768 Should this message use something like "long.__name__" instead so it more accurately print "long" on Python 2 and "int" on Python 3?

YKdvd avatar Sep 07 '21 22:09 YKdvd

Ah, yes good idea. Can you submit a PR for this? I can get this merged quickly.

mottosso avatar Sep 08 '21 07:09 mottosso