Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 3BFD7429E20 for ; Mon, 9 May 2011 08:13:15 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IAv+DdOmd98l for ; Mon, 9 May 2011 08:13:14 -0700 (PDT) Received: from smtp1.kolej.mff.cuni.cz (smtp1.kolej.mff.cuni.cz [78.128.192.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 377CB431FB5 for ; Mon, 9 May 2011 08:13:14 -0700 (PDT) X-Envelope-From: anton@khirnov.net Received: from zohar.localdomain (zohar.kolej.mff.cuni.cz [78.128.198.199]) by smtp1.kolej.mff.cuni.cz (8.14.4/8.14.4) with ESMTP id p49FDANd089984; Mon, 9 May 2011 17:13:11 +0200 (CEST) (envelope-from anton@khirnov.net) Received: by zohar.localdomain (Postfix, from userid 1000) id 4FF447F508; Mon, 9 May 2011 17:13:10 +0200 (CEST) From: Anton Khirnov Subject: Re: [PATCH] python/thread: always return a string in get_subject/authors To: David Bremner , notmuch@notmuchmail.org In-Reply-To: <87bozcvzdy.fsf@zancas.localnet> References: <1304924794-20380-1-git-send-email-anton@khirnov.net> <87bozcvzdy.fsf@zancas.localnet> Date: Mon, 09 May 2011 17:13:10 +0200 Message-Id: <20110509151310.4FF447F508@zohar.localdomain> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 May 2011 15:13:15 -0000 On Mon, 09 May 2011 09:20:41 -0300, David Bremner wrote: > On Mon, 9 May 2011 09:06:34 +0200, Anton Khirnov 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