Add __repr__ for QColor?

Nyall Dawson nyall.dawson at gmail.com
Tue Apr 4 22:40:01 BST 2023


Hi list!

I'm wondering if it would be possible to add a __repr__ for the QColor
class. PyQt doesn't set one itself, but it's VERY useful for debugging
purposes.

Downstream we patch one in using this approach:
https://github.com/qgis/QGIS/blob/574d1ea47b921ff9733f75b577e38034bae74793/python/PyQt/PyQt5/QtGui.py#L27

Would you consider adding a similar repr to PyQt itself?

Many thanks!
Nyall


More information about the PyQt mailing list