I would like to set the func_doc
(as an expression) within def
.
def f():
\'\'\'My function help\'\'\' #Set the
You cannot. The rule is: A string literal as first statement is taken as docstring. If it's an expression, it is not a string literal, and hence ignored.
You can also explicitly assign to the docstring attribute afterwards if you really need this. I don't see why you'd need it though. Your reasons seem fishy to me: