[PyQt] Support for Keyword Arguments
Baz Walter
bazwal at ftml.net
Sun Nov 22 18:38:21 GMT 2009
Phil Thompson wrote:
> The next question is whether to name arguments based on manual inspection -
> accepting that this will take a long time (possibly forever).
this seems like a huge undertaking for a relatively small gain.
> Alternatively, names that aren't covered by any conventions can be
> automatically taken from the Qt documentation. That risks lower quality
> names but means that everything will have a name in v4.7.
>
the lowest quality names are the very short abbreviations (i.e. only one
or two letters).
these are usually based on the type of the argument. so QEvent maps to
"e" or "ev", QWidget to "w", QSize to "s" or "sz", etc. then again, in
many other places qt will use an unabbreviated type-name such as
"event", "widget" or "size".
the overall quality and consistency of the names could be improved a lot
by expanding these short abbreviations (assuming, of course, that the
frequency of name clashes is very low).
a rough search for QWidget arguments in the qt-4.5.2 source found about
450 cases, with 180 using the name "widget" and 110 using the name "w".
so expanding "w" to "widget" could improve about 25% of the names.
More information about the PyQt
mailing list