yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #05913
Re: newline in class attribute docs
Hi Vaclav,
sometext n Example:
creates no new line (no matter if there is space or not between n and surrounded words)
sometextnnExample:
creates new paragraph, but with space between the end of previous and the beginning of next paragraph, what I did not want..
I tried to solve this "problem" using _extraDocs.py, (adding for example Peri3dController.stress there)
wrapper.Peri3dController.stress.__doc__=r'''text'''
but this imply error in startup of yade:
TypeError: readonly attribute
Segmentation fault
(wrapper.Peri3dController.__doc__=r'''text''' works fine)
It is not really a problem for me, I just wanted to know if there is a simple solution :-)
Best wishes
Jan
______________________________________________________________
> Od: "Vaclav Smilauer" <eudoxos@xxxxxxxx>
> Komu: yade-dev@xxxxxxxxxxxxxxxxxxx
> Datum: 15.10.2010 11:50
> Předmět: Re: [Yade-dev] newline in class attribute docs
>
>> chystam se na commit Peri3dControlleru, zrovna dodelavam dokumentaci, a
>> zajimalo by me, jestli jde do .hpp do docstringu (viz nize) vlozit novy
>> radek? povedlo se mi ze nn zacne novy radek, ale s mezerou (jakoby novy
>> odstavec). Jde neco bez mezery?
>
>[this is a question appropriate for the list]
>
>Hi Jan,
>
>you can insert newline in docstring using usual c escape sequence n. New
>paragraph is created with nn, though you have to be careful to *not*
>leave space after the second n -- otherwise the line will be indented by
>that space and sphinx will ,ake an indented block instead of plain new
>paragraph. Therefore: end of first paragraphnnstart of new paragraph.
>
>Currently, though, Peri3dController is documented in py/_extraDocs.py,
>which is easier to read and write (python multi-line strings) than in c. Be
>also careful to not document in both places; _extraDocs.py will overwrite
>the doc given in c++, that is explain the that file.
>
>Cheers, Vaclav
>
>
>
>_______________________________________________
>Mailing list: https://launchpad.net/~yade-dev
>Post to : yade-dev@xxxxxxxxxxxxxxxxxxx
>Unsubscribe : https://launchpad.net/~yade-dev
>More help : https://help.launchpad.net/ListHelp
>
Follow ups