Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
Description
Feature or enhancement
Update the docstrings tooperator.itemgetter
,operator.attrgetter
, andoperator.methodcaller
so that they will automatically be given__text_signature__
strings soinspect.signature
will give correct signature.
Pitch
These are the only functions inoperator
that don't have signatures.operator
functions are often used when programming in a functional style, and sometimes signature inspection is useful to e.g. determine whether a call is valid or whether to curry arguments.
Also, as a user, I find it nice to see accurate text signatures in the docstring and when callinghelp(func)
.
Previous discussion
These were intentionally skipped whenoperator
functions were updated to use the argument clinic. See:
- Derby #18: Convert 31 sites to Argument Clinic across 23 files #64385 (comment)
- orhttps://bugs.python.org/issue20186#msg244971
PR forthcoming.