Hello everybody,

On Wednesday, 12 September 2001, you (James Henstridge) wrote:
> One request that has come up many times is to drop the "Gtk" prefix from
> the widget class names in pygtk.
...
> As this would cause large source incompatibility, I am looking for
> people's opinions about such a change (I haven't decided which way I feel
> about this issue yet).

I'm pretty in favor of it.  Seems cleaner and more Pythonish.  I always
wondered why the module name is repeated as prefix for all functions,
because the way you propose now seems so more simpler.

Additionally, changes required to existing sources are not so difficult: 
should just be a matter of subsituting "gtk." for "gtk_" and adjusting
import statements.

...
> and the functions in the gtk module that were from GDK have been moved to
> gtk.gdk module.

Here, having separate modules for each prefix may be more appropriate.
I prefer writing "gdk.something" rather than "gtk.gdk.something"; OTOH I
could as well change my import statement to "import gtk; from gtk import
gdk" and go on using the first form.

This is a bigger problem for constants: "GTK.CONSTANT" is more readable
than "gtk.CONSTANT", but I know having a "GTK" module beside "gtk"
raises case problems on some "platform".

I'm confident there is a module organization that makes things appear
clean to the developper about all aspects.

> There is one other major change that I am considering (although it will
> affect the API far less) -- using the new python 2.2 features instead of
> ExtensionClass.  I haven't started looking at how easy such a change would
...

I see another advantage:  as time passes, more features will be added to
this Python mechanism, and using the standard way to do things will allow
PyGtk to benefit from new features with minor or no changes to it (since
Python's APIs are traditionally more stable).
There still are problems with ExtensionClass, and one can hope that
Python's own implementation will work more seamlessly, sooner or later.

-- 
Hope this helps,
Fabien.
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to