]> git.cworth.org Git - obsolete/notmuch-old/commit
python: cleanup the __nonzero__ implementations
authorJustus Winter <4winter@informatik.uni-hamburg.de>
Mon, 30 Apr 2012 17:12:36 +0000 (19:12 +0200)
committerJustus Winter <4winter@informatik.uni-hamburg.de>
Mon, 30 Apr 2012 17:25:16 +0000 (19:25 +0200)
commit7f74a400d197dac5cdf36960f68f63ce3eeff486
tree9dcedef71864d1bd683e3fda85ee13b80a2deed2
parent162687a99e412098729d639ed7bc27f01372cb84
python: cleanup the __nonzero__ implementations

Cleanup the code, reword the docstring and use the same implementation
in the Threads, Tags and Messages classes.

__nonzero__ implements truth value testing. If __nonzero__ is not
implemented, the python runtime would fall back to `len(..) > 0` thus
exhausting the iterator.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
bindings/python/notmuch/messages.py
bindings/python/notmuch/tag.py
bindings/python/notmuch/threads.py