[PyQt] (newbie) PyQt module namespaces
David Boddie
dboddie at trolltech.com
Mon Jul 20 16:13:01 BST 2009
On Mon Jul 20 15:53:03 BST 2009, Imre "Public" Tuske wrote:
> So, apart from the fact that it would be a non-pythonic heresy, is
> there any danger of importing all PyQt sub-modules into the global
> namespace? Is there a risk of say name collisions between the various
> sub-modules or any other thing that I should be aware of?
The only problems I'm aware of are the name collisions between some built-in
functions and objects in QtCore. For example, importing everything from
QtCore into the main namespace will cause the hex() and oct() built-in
functions to be lost, though you can still access them via the __builtin__
module.
The SIGNAL and SLOT objects are also fairly generic names, so you might
have issues with those and other modules if you also import their names
into the main namespace.
David
More information about the PyQt
mailing list