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 11:23:16 -0400

To: Anton Khirnov, David Bremner, notmuch@notmuchmail.org

Cc:

From: Jesse Rosenthal


On Mon, 09 May 2011 17:13:10 +0200, Anton Khirnov <anton@khirnov.net> wrote:
> 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).

The RFC says yes on the author, no on the subject. The only things
guaranteed are "From:" and originating timestamp. So I'm not sure why
subject should be guaranteed a string result and not, say, "Cc." 

My sense is that Python users are prety good with testing against None,
especially since (not "") == (not []) == (not None) == True. This change
seems like it would end up producing more inconsistencies with the way
you deal with headers, by producing special cases.

--Jesse

Thread: