Title: operator.{itemgetter,attrgetter,methodcaller} don't have signatures · Issue #94590 · python/cpython · GitHub
Open Graph Title: operator.{itemgetter,attrgetter,methodcaller} don't have signatures · Issue #94590 · python/cpython
X Title: operator.{itemgetter,attrgetter,methodcaller} don't have signatures · Issue #94590 · python/cpython
Description: Feature or enhancement Update the docstrings to operator.itemgetter, operator.attrgetter, and operator.methodcaller so that they will automatically be given __text_signature__ strings so inspect.signature will give correct signature. Pit...
Open Graph Description: Feature or enhancement Update the docstrings to operator.itemgetter, operator.attrgetter, and operator.methodcaller so that they will automatically be given __text_signature__ strings so inspect.si...
X Description: Feature or enhancement Update the docstrings to operator.itemgetter, operator.attrgetter, and operator.methodcaller so that they will automatically be given __text_signature__ strings so inspect.si...
Opengraph URL: https://github.com/python/cpython/issues/94590
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"operator.{itemgetter,attrgetter,methodcaller} don't have signatures","articleBody":"**Feature or enhancement**\r\n\r\nUpdate the docstrings to `operator.itemgetter`, `operator.attrgetter`, and `operator.methodcaller` so that they will automatically be given `__text_signature__` strings so `inspect.signature` will give correct signature.\r\n\r\n**Pitch**\r\n\r\nThese are the only functions in `operator` 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.\r\n\r\nAlso, as a user, I find it nice to see accurate text signatures in the docstring and when calling `help(func)`.\r\n\r\n**Previous discussion**\r\n\r\nThese were intentionally skipped when `operator` functions were updated to use the argument clinic. See:\r\n- https://github.com/python/cpython/issues/64385#issuecomment-1093641466\r\n- or https://bugs.python.org/issue20186#msg244971\r\n\r\nPR forthcoming.","author":{"url":"https://github.com/eriknw","@type":"Person","name":"eriknw"},"datePublished":"2022-07-06T05:02:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/94590/cpython/issues/94590"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6964a9c0-aeb3-48d3-4a4c-dcf78d40e3f2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 878A:E3A3B:7A94C8:A3D5E4:69697919 |
| html-safe-nonce | 278bb4a47d6938a2f67a10970dab5c66a48beb348c91870241c7d19094b883ce |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzhBOkUzQTNCOjdBOTRDODpBM0Q1RTQ6Njk2OTc5MTkiLCJ2aXNpdG9yX2lkIjoiMzY0MDAwNzk4NjU0MTg1Mjk1MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8c68b73cf578a1712e31a105854f467c0d565b09acd19aea592fe8e249a816a5 |
| hovercard-subject-tag | issue:1295135985 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/94590/issue_layout |
| twitter:image | https://opengraph.githubassets.com/84629e32c70117ce920d0f23cf7a7ad90f31d6f69af1d41d923d13c6ed2ce539/python/cpython/issues/94590 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/84629e32c70117ce920d0f23cf7a7ad90f31d6f69af1d41d923d13c6ed2ce539/python/cpython/issues/94590 |
| og:image:alt | Feature or enhancement Update the docstrings to operator.itemgetter, operator.attrgetter, and operator.methodcaller so that they will automatically be given __text_signature__ strings so inspect.si... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | eriknw |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 212e3e3d3298bf5b313830edfd2399e869f7ea76 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width