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 1089 - Add iterator protocol support to QSize
: Add iterator protocol support to QSize
Status: NEW
Product: PySide
Classification: Unclassified
Component: QtCore
: HEAD
: PC Linux
: P5 enhancement
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2011-12-10 12:54 EET by Thomas Perl
Modified: 2012-03-08 16:57 EET (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 Thomas Perl 2011-12-10 12:54:41 EET
This is just a nice-to-have feature request, but in some cases, it would be
useful (and more Pythonic) if QSize objects could be made iterable, so that we
can unpack its values like this:

>>> from PySide.QtCore import QSize
>>> size = QSize(300, 400)
>>> width, height = size
>>> print width
300
>>> print height
400

Right now, this does not work, and results in a TypeError:

TypeError: 'PySide.QtCore.QSize' object is not iterable
Comment 1 Matti Airas 2012-03-08 16:57:34 EET
PySide is now a Qt-addon and uses Qt Project's JIRA tool for tracking bugs.
Please verify that the bug is still valid and re-submit it in the address
below:

https://bugreports.qt-project.org/

Sorry for the inconvenience!