Re: python: unpythonic result of Message.get_replies()

Subject: Re: python: unpythonic result of Message.get_replies()

Date: Wed, 02 Nov 2011 08:29:42 +0100

To: Justus Winter, notmuch@notmuchmail.org

Cc:

From: Sebastian Spaeth


On Wed, 05 Oct 2011 03:42:38 +0200, Justus Winter <4winter@informatik.uni-hamburg.de> wrote:
Non-text part: multipart/mixed
> I noticed that Message.get_replies() returns a Messages object *or*
> None. Quoting the documentation:
> 
> > Returns: Messages or None if there are no replies to this message
> 
> Messages is a class implementing the iterator protocol, so a python
> programmer would expect to get an iterator that raises a StopIteration
> on the first invocation of next() if there aren't any replies.
> 

Yes, that change would make perfect sense, and I would be happy to
accept a patch for it :-)

Sebastian
part-000.sig (application/pgp-signature)

Thread: