Python GObject Introspectation Syntax



Hey folks,

I hope this is the right place to ask this question - I didn't find
anything out there on this topic yet. Just tell me if it is better to
refer to some other place.

Well, I just started to dive into GObject Introspectation and read some
documentation on the Python bindings. I love the idea and think it's
the way to go. I'm definitely going to port my projects as soon as
possible.

Before I start to elaborate my point, I would like to know whether
there has already been a discussion about this topic. So I'll try to
keep it short:

I think the following syntax is somewhat strange for Python-programmers
and doesn't really follow PEP8:

    from gi.repository import Gtk

I found this on
http://live.gnome.org/GObjectIntrospection/HowToWriteALanguageBinding:

> Use the same coding style as your language. If libraries for your
> language normally uses underscores do that as well. For instance,
> Java bindings should have a method on it's GtkButton wrapper called
> setLabel and not set_label.

Following this statement, wouldn't it be better to have something like

    from gi.repository import gtk

which would fullfill PEP8's requirements and be more pythonic? This
would help people to port their apps a lot.

Thanks in advance,
Sebastian Billaudelle

P. S.: Sorry for my English. I'm not a native speaker and really tired.
Maybe I'll take a look at this mail tomorrow and won't even get it by
myself;)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]