From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 289BB6DE0C6B for ; Sat, 10 Jun 2017 04:10:19 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=5 tests=[AWL=0.010, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nHjqMZ5x5JHo for ; Sat, 10 Jun 2017 04:10:18 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 4E4036DE0C64 for ; Sat, 10 Jun 2017 04:10:18 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1dJeGY-0008HD-N5; Sat, 10 Jun 2017 07:09:14 -0400 Received: (nullmailer pid 20743 invoked by uid 1000); Sat, 10 Jun 2017 11:10:13 -0000 From: David Bremner To: l-m-h@web.de, notmuch@notmuchmail.org Cc: Lucas Hoffmann Subject: Re: [PATCH 1/2] python: add bindings for notmuch_database_get_config{, _list} In-Reply-To: <7cb0da4d17891d1284b14dbdbe116c65dfaf0195.1496596853.git.l-m-h@web.de> References: <7cb0da4d17891d1284b14dbdbe116c65dfaf0195.1496596853.git.l-m-h@web.de> Date: Sat, 10 Jun 2017 08:10:13 -0300 Message-ID: <87zidgcd4a.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Sat, 10 Jun 2017 11:10:19 -0000 l-m-h@web.de writes: Thanks for writing these bindings, it will be good to have the bindings (almost) catch up to the library again. We generally expect more than just a subject line in the commit message https://notmuchmail.org/contributing/#index5h2 > + def get_config(self, key): > + """Return the value of the given config key. I guess we will eventually want set_config as well, even if it's not needed for your immediate application. It might save future confusion to add them both at the same time (unless there's something complicated about adding set_config). It would be good to add a couple tests. test/T590-libconfig.sh has some C tests. I think the first one, labelled "notmuch_database_{set,get}_config" could just be translated into python (maybe even replace the C test with the python one, depending what others think). > + def get_config_list(self, prefix): I don't object to the simplified interface, but I would like to know what we can do if it becomes a performance bottleneck. Would it be possible to replace building the list with a generator (yield statement) without changing client code? or should we take the leap now?