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 0E9A4429E21 for ; Mon, 2 Jan 2012 08:03:57 -0800 (PST) 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 kOsBHw3HfWUE for ; Mon, 2 Jan 2012 08:03:56 -0800 (PST) Received: from homiemail-a75.g.dreamhost.com (caiajhbdcbhh.dreamhost.com [208.97.132.177]) by olra.theworths.org (Postfix) with ESMTP id 86859431FD0 for ; Mon, 2 Jan 2012 08:03:56 -0800 (PST) Received: from homiemail-a75.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a75.g.dreamhost.com (Postfix) with ESMTP id DF89B5EC07E; Mon, 2 Jan 2012 08:03:55 -0800 (PST) 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=YRp7pIe63m0fi5w/qugjT8JUF53 34KyoQAubpNrU9uCkQrZPJypL8staxPxaYa8MaB5sgNm+WYtrtCWJr2y3B9IaJIr YHpY5ouF31e001vy3IJBwDJ1vkGGiGs4r0f0qEcFMpNHIyLUbZIl2BhoShou41Lb tcKszvjBmnvg905M= 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=eLr2iUGQllw6mmA2QN+FGAH77OI=; b=A fTecDSoM29zUlJeRPkhLIzUAixfQtV4XNssActPUikFtRc9rnX/T7rK5mJEt20Du 9UFxElPJpFUUUYFkCeQVUVry/x8DTjmiG/Y/ZfL8CB2s5LQ+uGPND09OcQiSWvcH 4JNV5wh2RMdSqiBEnW1GxATDW3xcynF26F6LgJ/W70= Received: from spaetzbook.sspaeth.de (unknown [176.46.227.178]) (Authenticated sender: fax@sspaeth.de) by homiemail-a75.g.dreamhost.com (Postfix) with ESMTPA id 43D275EC07C; Mon, 2 Jan 2012 08:03:54 -0800 (PST) Received: by spaetzbook.sspaeth.de (sSMTP sendmail emulation); Mon, 02 Jan 2012 17:03:51 +0100 From: Sebastian Spaeth To: Justus Winter <4winter@informatik.uni-hamburg.de>, notmuch@notmuchmail.org Subject: Re: [PATCH 2/2] python: make the result of Message.get_replies() more pythonic In-Reply-To: <1324473302-10869-3-git-send-email-4winter@informatik.uni-hamburg.de> References: <87sjm79e3d.fsf@SSpaeth.de> <1324473302-10869-1-git-send-email-4winter@informatik.uni-hamburg.de> <1324473302-10869-3-git-send-email-4winter@informatik.uni-hamburg.de> User-Agent: Notmuch/0.10+58~g935365d (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Mon, 02 Jan 2012 17:03:51 +0100 Message-ID: <8762guks60.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: Mon, 02 Jan 2012 16:03:57 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Wed, 21 Dec 2011 14:15:02 +0100, Justus Winter <4winter@informatik.uni-h= amburg.de> wrote: > Formerly Message.get_replies() returned an iterator or None forcing > users to check the result before iterating over it leading to strange > looking code at the call site. >=20 > Fix this flaw by adding an EmptyMessagesResult class that behaves like > the Messages class but immediatly raises StopIteration if used as an > iterator and returning objects of this type from Message.get_replies() > to indicate that there are no replies. Makes sense, pushed. It shouldn't cause the breaking of existing clients... (famous last words) Sebastian --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8B1WcACgkQVYX1jMgnoGJtVACdHO351Cch80jbDHtPv9pVKEpz k9YAnis20xlRt3j+TN9DNddTmsUFMgtv =rX7+ -----END PGP SIGNATURE----- --=-=-=--