[PyQt] Symbol naming system for PyQt under Python 3

Phil Thompson phil at riverbankcomputing.com
Fri Dec 12 18:27:42 GMT 2008


On Fri, 12 Dec 2008 18:09:56 +0000, "Paul A. Giannaros"
<paul at giannaros.org> wrote:
> Hi all,
> 
> When there was a discussion regarding PyQt wishes for Python 3.0 I
> proposed changing the mechanism by which you refer to symbols[1] .
> Thus something like "QtGui.QApplication" could be refered to as
> "Qt.Application".
> As Qt does not use namespaces itself, there would be no conflicts of
> names. The idea is that you'd then import any module and its symbols
> would then be added to the Qt namespace when you've done so. This
> system would therefore save on redundant typing while sidestepping
> namespace pollution.
> 
> Any thoughts on this?

Nothing printable ;)

You can already do Qt.QApplication is you really want to, so you are saving
yourself one character.

Qt does use namespaces. KDE uses lots of namespaces.

A class in PyQt should have the same name as the class in Qt if at all
possible.

Phil


More information about the PyQt mailing list