diff options
| author | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2011-06-02 16:28:00 +0200 |
|---|---|---|
| committer | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2011-06-02 16:28:00 +0200 |
| commit | 01cc4a31155dc71643fce1b619778493c1ff0dd7 (patch) | |
| tree | b8847a55041cb6939dde49ac5b7738b7e98e0b09 /bindings/python/debian/control | |
| parent | 4d406d9c252e707477a1cc744c4ee74bde4d1c3c (diff) | |
bindings/python: implement Threads().__nonzero__
__nonzero__ checks if Threads() contains at least one more valid thread
The existence of this function makes 'if Threads(): foo' work, as that
previously implicitely called len() exhausting the iterator. This
function makes `bool(Threads())` work repeatedly.
For further info, see http://docs.python.org/reference/datamodel.html.
Credits for the hint go to Brian May.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'bindings/python/debian/control')
0 files changed, 0 insertions, 0 deletions
