PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 991 - The __repr__ of various types is broken
: The __repr__ of various types is broken
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtGui
: 1.0.6
: All All
: P1 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-08-28 20:26 EEST by Farsmo
Modified: 2011-09-21 20:49 EEST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Farsmo 2011-08-28 20:26:13 EEST
PySide 1.0.6:

>>> from PySide.QtGui import *
>>> QPen()
<0x1ef2500  at 0x02F0EDC8>
>>> QBrush()
<0x2f82e90  at 0x02F0EDF0>

PySide 1.0.5:

>>> from PySide.QtGui import *
>>> QPen()
<PySide.QtGui.QPen(0,QBrush(QColor(ARGB 1, 0, 0, 0) , SolidPattern )  ,
SolidLine , 16 , 64 , QVector() , 0 , 2 )   at 0x02F33B98>
>>> QBrush()
<PySide.QtGui.QBrush(QColor(ARGB 1, 0, 0, 0) , NoBrush )   at 0x02F33BC0>
Comment 1 Hugo Parente Lima 2011-08-29 17:13:16 EEST
I think repr of QPen and QBrush are possible but not feasible.

A QBrush could have a QPixmap as attribute and both, QPen and QBrush, have many
attributes that aren't set by any constructor, I mean, these types aren't
trivial types to be entirely described in one single line of Python executable
code.

PyQt also doesn't implement repr for these types, probably for the same
reasons.
Comment 2 Hugo Parente Lima 2011-08-29 17:19:09 EEST
Now I got what you wanted to say.... is not about a complete repr message, but
a readable message as we had before, sorry for misunderstand the report.
Comment 3 renato filho 2011-08-30 17:50:10 EEST
fixed on shiboken commit:

ommit 2abcac202b5809dc242f76c8b5c4b0887b0dc074
Author: Renato Filho <renato.filho@openbossa.org>
Date:   Tue Aug 30 11:20:46 2011 -0300
Comment 4 renato filho 2011-09-21 20:49:29 EEST
Release 1.0.7