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 EB1D0429E27 for ; Mon, 9 May 2011 18:00:51 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.09 X-Spam-Level: X-Spam-Status: No, score=-0.09 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, T_MIME_NO_TEXT=0.01] 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 AUft7FgMEM5f for ; Mon, 9 May 2011 18:00:51 -0700 (PDT) Received: from homiemail-a76.g.dreamhost.com (mailbigip.dreamhost.com [208.97.132.5]) by olra.theworths.org (Postfix) with ESMTP id 40215429E26 for ; Mon, 9 May 2011 18:00:51 -0700 (PDT) Received: from homiemail-a76.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a76.g.dreamhost.com (Postfix) with ESMTP id 7AE51458080; Mon, 9 May 2011 18:00:50 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=SSpaeth.de; h=from:to:subject :in-reply-to:references:date:message-id:mime-version: content-type; q=dns; s=sspaeth.de; b=azxpWIOOqew6ig0ZRQcbHq2ibkT nkPPSjNGf9ReSwuPEvJNMbQAp9s9qVNpjX9sFMwCDR14vorXl84pczQOKEqPhPTH g+tTDyGRkA7Y8nLlK2tRUpkU6SALofqYuEnFXMf/2LzVpxEsndDvi3FgdysHhj9I Qd9ln6hP2de6fvIs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=SSpaeth.de; h=from:to :subject:in-reply-to:references:date:message-id:mime-version: content-type; s=sspaeth.de; bh=vPqNp0k2gybtKmIdECYhaCMbNOI=; b=N Zr4/PZ+lXJwL89BQUKhPGdQ3eKIegVDPNQ93sPO7rSq46OYWnBF9x2UuxtG8sBal 45ftx3ZXB2drh+wcu2Qb5dyg8wUyNBkJSrR49LIlEXK9MQZJz2fgDCstbgXE6ydk pgUwPSqeN+XJnpOYRBNqpVAcot8rATTFGuT4SeYGN8= Received: from spaetzbook.sspaeth.de (c80-217-195-47.bredband.comhem.se [80.217.195.47]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: fax@sspaeth.de) by homiemail-a76.g.dreamhost.com (Postfix) with ESMTPSA id AE269458079; Mon, 9 May 2011 18:00:48 -0700 (PDT) Received: by spaetzbook.sspaeth.de (sSMTP sendmail emulation); Tue, 10 May 2011 03:00:45 +0200 From: Sebastian Spaeth To: David Bremner , Anton Khirnov , notmuch@notmuchmail.org Subject: Re: [PATCH] python/thread: always return a string in get_subject/authors In-Reply-To: <87bozcvzdy.fsf@zancas.localnet> References: <1304924794-20380-1-git-send-email-anton@khirnov.net> <87bozcvzdy.fsf@zancas.localnet> User-Agent: Notmuch/0.5-164-g8ce82ed (http://notmuchmail.org) Emacs/23.1.50.1 (x86_64-pc-linux-gnu) Date: Tue, 10 May 2011 03:00:44 +0200 Message-ID: <87zkmv5pz6.fsf@SSpaeth.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" 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: Tue, 10 May 2011 01:00:52 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Mon, 09 May 2011 09:20:41 -0300, David Bremner wrote: > On Mon, 9 May 2011 09:06:34 +0200, Anton Khirnov wro= te: > > Now None is returned when those don't exist, which is inconvenient to > > deal with. >=20 > 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: =2D 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. =2D People have been writing code and breaking backwards compatability for such a small gain doesn't really seem worth it. =2D 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 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk3Ijj0ACgkQVYX1jMgnoGK9KACfWcOpLx/BBx6ag1dkf7KGN5yX PyAAn0kBkL6eqFKegSJprr7HE+GiSLeW =+jUo -----END PGP SIGNATURE----- --=-=-=--