You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #65824 the "Help on ..." was added in the "less" prompt in pydoc. It works good in the CLI or hen you call help() with a string, but unfortunately, it is not so good for help() used in the REPL with non-string argument. For example, help(str) has a prompt starting with "Help on type ", and help(str.upper) -- "Help on method_descriptor ". In the latter case, the help text itself is started with "Help on method_descriptor:", but this is a different issue.
The proposed PR improves the prompt. It now uses the objects __qualname__ or __name__ if they are available (this covers classes, functions, methods, and many others), and falls back to "{typename} object" otherwise.
Activity
pythongh-120541: Improve the "less" prompt in pydoc
gh-120541: Improve the "less" prompt in pydoc (GH-120543)
pythongh-120541: Improve the "less" prompt in pydoc (pythonGH-120543)
[3.13] gh-120541: Improve the "less" prompt in pydoc (GH-120543) (GH-…
pythongh-120541: Improve the "less" prompt in pydoc (pythonGH-120543)
pythongh-120541: Improve the "less" prompt in pydoc (pythonGH-120543)
pythongh-120541: Improve the "less" prompt in pydoc (pythonGH-120543)