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
Description: PGP signature
_______________________________________________ notmuch mailing list firstname.lastname@example.org http://notmuchmail.org/mailman/listinfo/notmuch