Re: [PATCH] python/thread: always return a string in get_subject/authors

Subject: Re: [PATCH] python/thread: always return a string in get_subject/authors

Date: Mon, 09 May 2011 17:13:10 +0200

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Anton Khirnov


On Mon, 09 May 2011 09:20:41 -0300, David Bremner <david@tethera.net> wrote:
> On Mon,  9 May 2011 09:06:34 +0200, Anton Khirnov <anton@khirnov.net> wrote:
> > Now None is returned when those don't exist, which is inconvenient to
> > deal with.
> 
> I'm not using the python bindings, but from a philosophical point of
> view, this change makes me a bit uncomfortable since it apparently
> merges two cases together, and makes an error (no Subject)
> indistinguishable from an odd situation (Subject of empty string).
> Or am I missing something here?

The question is whether this is really a problem.

For a single message, it might make sense to distinguish between 'no
header' and 'empty header'.

But those aren't message headers, those are thread properties. And I'd
argue that a thread always has authors and a subject (possibly empty).

--
Anton Khirnov

Thread: