Closed
Description
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
?