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

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon May 9 18:18:38 PDT 2011


On 05/09/2011 09:00 PM, Sebastian Spaeth wrote:
> 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?
> 
> 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.

I'm going to "me too!" this sentiment as well.  Please do *not* conflate
no-subject with subject-is-empty-string.

If we leave them distinct, the caller is free to conflate them if they
want.  But if we conflate the two states first, there's no way for the
caller to differentiate between the two if they want to.

Thanks,

	--dkg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1030 bytes
Desc: OpenPGP digital signature
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110509/6eaa6210/attachment.pgp>


More information about the notmuch mailing list