Closed
Description
After #23405 we now have KeyWrapper
exposed.
I suspect that it is an internal helper and should not be importable:
Python 3.12.0a0 (heads/main:0d04b8d9e1, Sep 7 2022, 13:20:36) [Clang 11.0.0 (clang-1100.0.33.16)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from _functools import KeyWrapper
>>> help(KeyWrapper)
Help on class KeyWrapper in module functools:
class KeyWrapper(builtins.object)
| Methods defined here:
|
| __call__(self, /, *args, **kwargs)
| Call self as a function.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __gt__(self, value, /)
| Return self>value.
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
Related #26416
Found while working on #96640
CC @shihai1991
I will send a PR shortly.