On Thu, 02 Jun 2011 16:20:14 +0200, Sebastian Spaeth wrote:

> I made the change, and implemented __nonzero__ and removed the len()
> method. It just doesn't make sense on 1-time iterators. (I documented
> the change in the API docs). Sorry if this breaks existing code.

FYI

OK, I just pushed a change that adds the __nonzero__ function thus
making:

t=Threads()
if t:
  len(t)

work, but I did not pull the len() function out. The explicit "if t"
test is however not needed for

t = q.search_threads()
for thread in t:
  print thread

works just fine with empty results.

Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20110602/055da5b8/attachment-0001.pgp>

Reply via email to