From: Tomi Ollila <tomi.ollila@iki.fi>
To: David Bremner <david@tethera.net>, VA <dev+notmuch@indigo.re>,
notmuch@notmuchmail.org
Subject: Re: [PATCH] python: fix get_property error when property doesn't exist
Date: Mon, 18 Feb 2019 21:29:57 +0200 [thread overview]
Message-ID: <m2lg2c3ney.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <871s46slvd.fsf@tethera.net>
On Sun, Feb 17 2019, David Bremner wrote:
> VA <dev+notmuch@indigo.re> writes:
>
>> Le 01/02/2019 à 14:45, David Bremner a écrit :
>>> Should we be throwing an appropriate exception rather than returning
>>> None? That seems more pythonic to me. In either case we should document
>>> the error handling.
>>
>> What would it be? KeyError?
>> Though, some standard Python methods like dict.get return None in case
>> the key doesn't exist.
>
> Vincent pointed out on IRC that this patch doesn't introduce returning
> None here, but just fixes the code that tries to do it. So this patch is
> an improvement on the status quo.
indeed. +1
Tomi
>
> d
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
next prev parent reply other threads:[~2019-02-18 19:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-27 8:40 [PATCH] python: fix get_property error when property doesn't exist Vincent A
2019-02-01 13:45 ` David Bremner
2019-02-06 19:24 ` VA
2019-02-17 11:19 ` David Bremner
2019-02-18 19:29 ` Tomi Ollila [this message]
2019-02-21 11:23 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2lg2c3ney.fsf@guru.guru-group.fi \
--to=tomi.ollila@iki.fi \
--cc=david@tethera.net \
--cc=dev+notmuch@indigo.re \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).