On Thu, 13 Sep 2001, Christian Robottom Reis wrote:

> On Thu, 13 Sep 2001, James Henstridge wrote:
>
> > Several people have commented on this.  The reason for gtk.gdk is partly
> > to reduce namespace polution, and partly because the gtk.gdk module is not
> > independent of the gtk one.  The gtk.gdk module is only created when
> > gtk._gtk is imported (the order of imports is all handled in
> > gtk.__init__).  Having gdk at the toplevel would have made this a little
> > harder.
>
> You could insert gdk manually into the top-level namespace when _gtk is
> imported, and I think it would actually work well.

That would be a trivial one line change.  One problem with that approach
is that the following would fail:
  import gdk ; import gtk
while the following would work:
  import gtk ; import gdk

With the current naming, you can order "ftom gtk import gdk" and "import
gtk" either way and get the same results.

The short-class-names-branch is now merged into head.  I am going to look
at getting all the constants automatically generated and inserted into the
module dictionary of gtk and gtk.gdk modules.

>
> > The Python 2.2 issue is a little less cut and dried.  However, the python
> > 2.2 type/class unification is the future.  Also, whereas ExtensionClass
> > has needed some upgrades after almost every release of python, this code
> > will most likely be kept up to date :)
>
> Agreed; Guido has made it a priority and 2.2 looks quite good right now
> (just looking at the current beta).

Yep.

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to