Details
Description
Trying to call `str` or `repr` on VoidPtr is not working at the moment, because after the changes related to PyString/PyUnicode this was not updated.
>>> from PySide2.QtCore import * >>> from PySide2.support import VoidPtr >>> o = QObject() >>> p = VoidPtr(o) >>> print(p) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: __str__ returned non-string (type bytes) >>> print(str(p)) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: __str__ returned non-string (type bytes) >>> print(repr(p)) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: __repr__ returned non-string (type bytes) >>> print(int(p)) 94198306228352
Attachments
For Gerrit Dashboard: PYSIDE-852 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
245154,3 | Update string treatment for VoidPtr | 5.12 | pyside/pyside-setup | Status: MERGED | -2 | 0 |