Quoting James Henstridge <[EMAIL PROTECTED]>:

> I think either using "from gtk import *" or "import gtk" are useful (they
> are just different styles of python programming).  I think I will leave
> the Gtk prefix on the classes though, since it is used in all other GTK
> language bindings I know of (perl, java, etc -- I know that the java
> bindings decided on keeping the Gtk prefix even though all the classes
> were in a gtk package).
>
> Anyway, calling constructors is only one part of a large program, so it is
> not as if it is that much overhead.

I myself wouldn't like to have to type gtk.GtkButton every time
(I've never inhertied from a Gtk class, yet, so that would mean
four keystrokes more for every usage of a Gtk-thing). But I agree
that the namespace should not be cluttered unneccessarily. I'd
propose to a) put all utility functions into a special class (so
there would be only one name instead of several) or b) put all these
functions into a module of their own which is imported by Gtk
(the symbols which are imported by a module are not visible when
the module is imported with "from module import *" AFAIK).

--
Aaron "Optimizer" Digulla             Team AMIGA     AROS Head of Development
Author of XDME, ResTrackLib, CInt.                     <http://www.aros.org/>
"(to) optimize: Make a program faster by improving the algorithms rather than
by buying a faster machine."                               <[EMAIL PROTECTED]>
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to