[PyQt] QtProperty docstrings

Javier Santacruz López-Cepero jsl at taric.es
Mon Oct 26 10:43:47 GMT 2015


You're right, its perfectly ok, I was checking against the instance object
instead of the class, sorry for the noise.

    Widget.prop.__doc__
    'from docstring'

Thanks




2015-10-26 10:15 GMT+01:00 Phil Thompson <phil at riverbankcomputing.com>:

> On 26 Oct 2015, at 8:43 a.m., Javier Santacruz López-Cepero <jsl at taric.es>
> wrote:
> >
> > Hi Phil,
> >
> >
> > Thank you for the fix! :)
> >
> > However, I've got to install PyQt 5.5.1 and got the following behaviour;
> When repeating my previous example, I get indeed a docstring, but its
> always the same and it comes from the standard docstring `str.__doc__`.
>
> ...which is what you would expect. In your previous example you were
> printing the docstring of the property, ie. Widget.prop.__doc__. In this
> example you are printing the docstring of the *value* of the property, ie.
> w.prop.__doc__ which is a str.
>
> Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20151026/79fcb3ec/attachment.html>


More information about the PyQt mailing list