[PATCH] python/thread: always return a string in get_subject/authors
Sebastian Spaeth
Sebastian at SSpaeth.de
Mon May 9 18:00:44 PDT 2011
On Mon, 09 May 2011 09:20:41 -0300, David Bremner <david at tethera.net> wrote:
> On Mon, 9 May 2011 09:06:34 +0200, Anton Khirnov <anton at 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?
Hi there,
This change makes me a bit uncomfortable too. 3 Reasons:
- I believe users should be able to distinguish the case when someone
uses an empty subject, and when someone doesn't specify a subject at
all.
- People have been writing code and breaking backwards compatability for
such a small gain doesn't really seem worth it.
- Testing-wise this is easy. Just test for "if subject:" on the returned
value and you'll get both cases (empty and non-existing).
But if people really want it, I won't object.
Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110510/ea8cf13e/attachment.pgp>
More information about the notmuch
mailing list