linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Benc <jbenc@upir.cz>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Kent Gibson <warthog618@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Darrien <darrien@freenet.de>,
	Viresh Kumar <viresh.kumar@linaro.org>, Jiri Benc <jbenc@upir.cz>,
	Joel Savitz <joelsavitz@gmail.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: [libgpiod v2][PATCH 3/5] bindings: python: add examples for v2 API
Date: Thu, 9 Jun 2022 15:21:12 +0200	[thread overview]
Message-ID: <20220609152112.12fc6db4@griffin> (raw)
In-Reply-To: <CAMRc=Md_7WO69hKqToSoAAyDQWxfqgg-PisrBF5AzrsKMM8FQA@mail.gmail.com>

On Thu, 9 Jun 2022 10:42:44 +0200, Bartosz Golaszewski wrote:
> On Thu, Jun 9, 2022 at 6:49 AM Kent Gibson <warthog618@gmail.com> 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

  reply	other threads:[~2022-06-09 13:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 14:06 [libgpiod v2][PATCH 0/5] bindings: implement python bindings for libgpiod v2 Bartosz Golaszewski
2022-05-25 14:07 ` [libgpiod v2][PATCH 1/5] bindings: python: remove old version Bartosz Golaszewski
2022-05-25 14:07 ` [libgpiod v2][PATCH 2/5] bindings: python: enum: add a piece of common code for using python's enums from C Bartosz Golaszewski
2022-05-25 14:07 ` [libgpiod v2][PATCH 3/5] bindings: python: add examples for v2 API Bartosz Golaszewski
2022-06-03 12:46   ` Kent Gibson
2022-06-04  2:41     ` Kent Gibson
2022-06-06 10:14       ` Andy Shevchenko
2022-06-07  1:52         ` Kent Gibson
2022-06-07 10:43           ` Andy Shevchenko
2022-06-08 15:39           ` Bartosz Golaszewski
2022-06-09  4:49             ` Kent Gibson
2022-06-09  8:42               ` Bartosz Golaszewski
2022-06-09 13:21                 ` Jiri Benc [this message]
2022-06-09 16:06                   ` Bartosz Golaszewski
2022-06-10  4:23                     ` Kent Gibson
2022-06-10  6:57                       ` Bartosz Golaszewski
2022-05-25 14:07 ` [libgpiod v2][PATCH 4/5] bindings: python: add tests " Bartosz Golaszewski
2022-05-25 14:07 ` [libgpiod v2][PATCH 5/5] bindings: python: add the implementation " Bartosz Golaszewski

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220609152112.12fc6db4@griffin \
    --to=jbenc@upir.cz \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=brgl@bgdev.pl \
    --cc=darrien@freenet.de \
    --cc=joelsavitz@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=viresh.kumar@linaro.org \
    --cc=warthog618@gmail.com \
    /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.
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 NNTP newsgroup(s).