python: unpythonic result of Message.get_replies()

2011-12-21 Thread Justus Winter
The attached patch series fixes this problem. Note that the wrapping nature of the notmuch bindings makes it kind of awkward to fix the behavior. I've decided to avoid introducing code to the Messages class to indicate that there are no messages and there is no notmuch object being wrapped, but to

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

2011-12-21 Thread Justus Winter
The attached patch series fixes this problem. Note that the wrapping nature of the notmuch bindings makes it kind of awkward to fix the behavior. I've decided to avoid introducing code to the Messages class to indicate that there are no messages and there is no notmuch object being wrapped, but to

python: unpythonic result of Message.get_replies()

2011-11-02 Thread Sebastian Spaeth
On Wed, 05 Oct 2011 03:42:38 +0200, Justus Winter <4winter at 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 m

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

2011-11-02 Thread Sebastian Spaeth
On Wed, 05 Oct 2011 03:42:38 +0200, Justus Winter <4win...@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 mess

python: unpythonic result of Message.get_replies()

2011-10-05 Thread Justus Winter
Hi everyone :) 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

python: unpythonic result of Message.get_replies()

2011-10-04 Thread Justus Winter
Hi everyone :) 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