directive that hides a line or multiple lines of text in a docstring

15 views
Skip to first unread message

kdschlosser

unread,
Jun 18, 2019, 1:01:06 AM6/18/19
to sphinx-users
I want to be able to use a decorator for logging purposes and I would like to be able to provide some information in that log entry that would be static information.

I could make a lookup table of function/method names along with the information I want to include but that seems to be a bit extreme. Considering there is already a mechanism to be able to do this exact thing. The issue would be that information being added to the documentation.

Is there a comment flag or a directive that will stop sphinx from including the line(s)?


Doug Hellmann

unread,
Jun 18, 2019, 9:19:28 AM6/18/19
to kdschlosser, sphinx-users
Have you tried using the reStructuredText comment syntax?

def myfunc():
"""this is included

so is this

..

but this should not show in the output
"""

--
Doug
Reply all
Reply to author
Forward
0 new messages