[PyQt] Support for Keyword Arguments
david at boddie.org.uk
Sun Nov 22 19:12:58 GMT 2009
On Sat, 21 Nov 2009 18:42:26 +0000, Phil Thompson wrote:
> There is also an impact on the documentation. At the moment the PyQt
> documentation (and the argument names it uses) is generated from the Qt .h
> files. The Qt documentation is generated from the Qt .cpp files - which are
> not always consistent with the .h files.
For those that don't look at the C++ sources, here are the three main
1. The signatures in the header files and source code can differ - it's
even possible that signatures in header files do not contain argument
2. The argument names in the Qt documentation differ from those in the
source code and header files.
3. The existing names are unsuitable - or they could be better
(see http://qt.nokia.com/doc/4.5/qregion.html#intersected for an
example of inconsistent naming).
> 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.
Quality control of the names used in source code and header files is lower
than that for documentation, for which appropriate names should have been
used, but it's not perfect.
Ideally, there would be a review of existing names in the documentation -
really, the names used in the code would be better, but I think that's
a lost cause. However, I can't really see this happening, unless people want
to start making changes and submitting merge requests via qt.gitorious.org.
Ultimately, it comes down to the question of whether or not people can live
with an imperfect API.
More information about the PyQt