[PyQt] Custom docstrings and complete signature

Phil Thompson phil at riverbankcomputing.com
Sat Dec 2 12:22:11 GMT 2017

On 2 Dec 2017, at 11:51 am, Denis Rouzaud <denis.rouzaud at gmail.com> wrote:
> It doesn't integrate the signature because we provide our own docstrings from the c++ headers.
> I was hoping for an automation of:
> - getting the signature in the pythonic way
> - getting all the overloaded methods listed

First off, docstrings are different to documentation. The former are only generated for objects that actually *do* exist. The latter is generated for all objects that *might* exist. For example, you want documentation to include platform-specific APIs but docstrings can only include the current platform. You need to take that into account when deciding how you are going to automate the documentation.

Just considering the docstrings for now you could provide a patch to sip that make the %Docstring directive work the way you want. For example, add a "generated" option that could have values of either "before", "after" or "discard". The default value would be "discard" (to maintain compatibility).


More information about the PyQt mailing list