Skip to content

Invoking 'help(...)' unexpectedly includes name of internal wrapper function. #122129

Closed
@jayaddison

Description

@jayaddison

Bug report

Bug description:

Attempting to retrieve documentation for the urlsplit function mostly works as expected, but the first line is confusing and appears to originate from a caching wrapper applied to the function (not relevant to usage documentation).

Python 3.12.4 (main, Jul 15 2024, 12:17:32) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib.parse import urlsplit
>>> help(urlsplit)

Help on _lru_cache_wrapper in module urllib.parse:

urlsplit(url, scheme='', allow_fragments=True)
...

Note: there is some existing mention of this (help and the interaction with the @lru_cache wrapper) in #88169 - if my report is a dup/invalid, please feel free to close this.

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Edit: fixup: add missing statement from interpreter session.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixestype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions