I would like my docstring to be an f-string to put information on, but if I try to do that it isn't showed when you type foo.__doc__
or help(foo)
, so I tried the following:
used .format()
which didn't register as a docstring
tried to do self.__doc__ = f"""..."""
, but it still didn't work:
def foo():
self.__doc__ = f"""foo() is a function."""
pass
I read on a site that it was possible to define the docstring without just putting a docstring at the beginning but it didn't say how.
How shall I start?