8000 contextlib.closing is a class, but the docs mark it as a function · Issue #92082 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
contextlib.closing is a class, but the docs mark it as a function #92082
Closed
@smheidrich

Description

@smheidrich

Documentation

contextlib.closing is a class (and has been since Python 2.x, perhaps always but I'm not sure), but the docs mark it as a function.

While searching for previous reports of this issue, I found #55102, which describes a similar mismatch between docs and reality for staticmethod and the resolution was that "this is a total non-issue", but in this case, right next to closing we have aclosing which is marked as a class, so this is just inconsistent.

Is this intentional and meant to signal to users that they shouldn't rely on closing being a class because that is considered an implementation detail? If so, why doesn't the same rationale hold for aclosing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0