Minor glitch in %Docstring example

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Minor glitch in %Docstring example

Giuseppe Corbelli
Hi all
The document
<a href="https://www.riverbankcomputing.com/static/Docs/sip/directives.html#directive-%Docstring">https://www.riverbankcomputing.com/static/Docs/sip/directives.html#directive-%Docstring


has an example that reads:
public:
     Klass();
%Docstring deindented
     This will be appended to the class's docstring and will not be
indented.

         This will be indented by four spaces.
%End


while it should be (note the quotes):
public:
     Klass();
%Docstring "deindented"
     This will be appended to the class's docstring and will not be
indented.

         This will be indented by four spaces.
%End


BTW, what is the correct syntax to get both deindented and appended?
I tried
%Docstring "deindented","appended"
%Docstring "deindented" "appended"
%Docstring "deindented";"appended"

with no luck (syntax error).

Thanks
--
Giuseppe Corbelli
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Minor glitch in %Docstring example

Phil Thompson-5
On 17/07/2019 16:01, Giuseppe Corbelli wrote:

> Hi all
> The document
> <a href="https://www.riverbankcomputing.com/static/Docs/sip/directives.html#directive-%Docstring">https://www.riverbankcomputing.com/static/Docs/sip/directives.html#directive-%Docstring
>
>
> has an example that reads:
> public:
>     Klass();
> %Docstring deindented
>     This will be appended to the class's docstring and will not be
> indented.
>
>         This will be indented by four spaces.
> %End
>
>
> while it should be (note the quotes):
> public:
>     Klass();
> %Docstring "deindented"
>     This will be appended to the class's docstring and will not be
> indented.
>
>         This will be indented by four spaces.
> %End
>
>
> BTW, what is the correct syntax to get both deindented and appended?
> I tried
> %Docstring "deindented","appended"
> %Docstring "deindented" "appended"
> %Docstring "deindented";"appended"
>
> with no luck (syntax error).

As it says in the link you posted...

%Docstring(format="deindented", signature="appended")

Phil
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt