From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D333EC433EF for ; Thu, 9 Jun 2022 13:31:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239796AbiFINb3 (ORCPT ); Thu, 9 Jun 2022 09:31:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238801AbiFINb0 (ORCPT ); Thu, 9 Jun 2022 09:31:26 -0400 X-Greylist: delayed 607 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 09 Jun 2022 06:31:22 PDT Received: from patejl.cela.cz (241-168-195-217.cust.centrio.cz [217.195.168.241]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7140FA8690 for ; Thu, 9 Jun 2022 06:31:22 -0700 (PDT) Received: from griffin (mem-185.47.222.164.jmnet.cz [185.47.222.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by patejl.cela.cz (Postfix) with ESMTPSA id 386A7A665; Thu, 9 Jun 2022 15:21:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=upir.cz; s=mail; t=1654780873; bh=tlV0TwvabMCDIgeG164b3Ba31Qh2U5kTmwI4rsYeFEQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=qiAsteDMSoRj2h0v3oTBU+yS9azYf+vHAetqFlA+XduJsJY/XhSoxobel4Cia39jo xqC38eNlx+vrO/AsyRxOegqtLhJes9HIyFY5qfLgInespCfAcQqk+WNPIPZ0sWfyof F19Hd7RazK5ECUAyCQ+iwnhKRmxR2baFsw63QbFA= Date: Thu, 9 Jun 2022 15:21:12 +0200 From: Jiri Benc To: Bartosz Golaszewski Cc: Kent Gibson , Andy Shevchenko , Linus Walleij , Darrien , Viresh Kumar , Jiri Benc , Joel Savitz , "open list:GPIO SUBSYSTEM" Subject: Re: [libgpiod v2][PATCH 3/5] bindings: python: add examples for v2 API Message-ID: <20220609152112.12fc6db4@griffin> In-Reply-To: References: <20220525140704.94983-1-brgl@bgdev.pl> <20220525140704.94983-4-brgl@bgdev.pl> <20220603124600.GA35695@sol> <20220604024131.GB13574@sol> <20220607015220.GA9430@sol> <20220609044922.GA11301@sol> X-Mailer: Claws Mail 4.0.0git415 (GTK+ 3.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.103.3 at patejl X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Thu, 9 Jun 2022 10:42:44 +0200, Bartosz Golaszewski wrote: > On Thu, Jun 9, 2022 at 6:49 AM Kent Gibson wrote: > > Agree that it would be easier to write a pythonic wrapper around the C > > API in Python, so no problem with that. > > However, the pythonic wrapper should the one named gpiod, as it is > > intended to be the primary interface for Python. Rename your existing > > to gpiod_c or gpiod_core or something. > > I don't agree. The module that wraps the C library should still be > called gpiod and be the primary interface. The pythonic module would > just offer helpers that would still use the gpiod data types for most > part. As a Python user, I'd much rather see the high level API being the primary interface and being named 'gpiod'. The easier to use and more Pythonic, the better. The low level library bindings and low level data types are just an implementation detail for me when coding in Python. If I wanted low level, I'd code everything directly in C. Just my two cents. Thanks for the good work in either case. Jiri