M
M
mkone1122021-12-31 17:56:29
Python
mkone112, 2021-12-31 17:56:29

How to remove indent added by help for docstring?

Tried adding 4 backspace - did not help:

def f():...
f.__doc__ = '\b\b\b\bhello'
help(f)

Help on function f in module __main__:

f()
   hello  <- как сместить к началу строки?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Pankov, 2021-01-02
@trapwalker

No way. All indents are evenly cut off by the help formatter and one indent is added.
Why do you feel like doing this game?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question