Re: [python] get all messages of a thread

Subject: Re: [python] get all messages of a thread

Date: Thu, 02 Jun 2011 16:37:53 +0200

To: Brian May, notmuch

Cc:

From: Sebastian Spaeth


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
part-000.sig (application/pgp-signature)

Thread: