Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve the "less" prompt in pydoc #120541

Closed
Labels
3.13bugs and security fixes3.14bugs and security fixes
@serhiy-storchaka

Description

@serhiy-storchaka

In#65824 the "Help on ..." was added in the "less" prompt in pydoc. It works good in the CLI or hen you callhelp() with a string, but unfortunately, it is not so good forhelp() used in the REPL with non-string argument. For example,help(str) has a prompt starting with "Help on type ", andhelp(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.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp