[PyKDE] Auto-connecting Slots

Jesper Anderson jesper at pobox.com
Mon Jan 30 18:56:24 GMT 2006


On Sat, Jan 28, 2006 at 08:18:25PM +0100, Gerard Vermeulen wrote:
>
> [ .. ]
>
> > > I mostly dislike the packing scheme of PyQt4, but I see where it's
> > > coming
> > > from, and as long as I'm allowed to use the "from QtCore import *"
> > > without
> > > polluting the global namespace, it's still good. Adding
> > > "signature" would be
> > > a serious problem.
> >
> > Again, I do see your point (now) and I do agree, that PyQt4 should
> > not
> > "forbid" the from QtCore import * by using such a general name for a
> > function.
> >
>
> Huh, I see:
>
> from PyQt4.QtCore import *
> from PyQt4.QtCore import signature as pyqtSignature
> import signature from signature
>
> as a minor inconvenience instead of a serious problem.

Wouldn't it then be better to normally use:

from PyQt4.QtCore import *

and when you want to avoid typing pyqtSignature:

from PyQt4.QtCore import *
from PyQt4.QtCore import pyqtSignature as signature

That way noone gets any nasty surprises, and the generic name
"signature" only ever gets assigned explicitly.

Jesper




More information about the PyQt mailing list