Title: Docs: make it easier to reference and markup decorators · Issue #105812 · python/cpython · GitHub
Open Graph Title: Docs: make it easier to reference and markup decorators · Issue #105812 · python/cpython
X Title: Docs: make it easier to reference and markup decorators · Issue #105812 · python/cpython
Description: Originally posted by @erlend-aasland in #105792 (comment) It would be nice if we had a "decorator role" that used the Python function/method markup, but instead of adding trailing parens, added a prefixing '@': :decorator:`dataclasses.da...
Open Graph Description: Originally posted by @erlend-aasland in #105792 (comment) It would be nice if we had a "decorator role" that used the Python function/method markup, but instead of adding trailing parens, added a p...
X Description: Originally posted by @erlend-aasland in #105792 (comment) It would be nice if we had a "decorator role" that used the Python function/method markup, but instead of adding trailing parens,...
Opengraph URL: https://github.com/python/cpython/issues/105812
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Docs: make it easier to reference and markup decorators","articleBody":"_Originally posted by @erlend-aasland in https://github.com/python/cpython/pull/105792#discussion_r1230584709_\r\n \r\n\u003e It would be nice if we had a \"decorator role\" that used the Python function/method markup, but instead of adding trailing parens, added a prefixing '@': ```:decorator:`dataclasses.dataclass` ``` =\u003e [@dataclasses.dataclass](https://docs.python.org/3.13/library/dataclasses.html#dataclasses.dataclass).\r\n\r\n\r\nThere's already `decorator` and `decoratormethod` directives for signatures. Perhaps we can exploit these so the `:py:meth:` and `py:func:` roles adapt the format according to what directive is used. A role could be a nice supplement, though; sometimes we want to explicitly refer to a decorator as a function or the other way around.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-118743\n* gh-139598\n* gh-139619\n* gh-139627\n* gh-139628\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/erlend-aasland","@type":"Person","name":"erlend-aasland"},"datePublished":"2023-06-15T08:16:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/105812/cpython/issues/105812"}
| 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:b8a982d6-407b-cea9-492b-029edadf23e9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D18A:7C3CC:F079D4:143D735:69699295 |
| html-safe-nonce | 520a0d3a14c23c0729c63f095dfbc4660e5fa0c3f2689ec5876c0b740cbd38ee |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMThBOjdDM0NDOkYwNzlENDoxNDNENzM1OjY5Njk5Mjk1IiwidmlzaXRvcl9pZCI6IjMxNDc5OTk5ODc5Mjg1MDI5MzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d2c19a707f48e63d919e3580c833ebb76411dc25efe0d0bb82c32b9abf411654 |
| hovercard-subject-tag | issue:1758293557 |
| 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/105812/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f2442bf6c22696cae4335fc75fb04d7499daf5588d4d085c01aed8685fbfcc9f/python/cpython/issues/105812 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f2442bf6c22696cae4335fc75fb04d7499daf5588d4d085c01aed8685fbfcc9f/python/cpython/issues/105812 |
| og:image:alt | Originally posted by @erlend-aasland in #105792 (comment) It would be nice if we had a "decorator role" that used the Python function/method markup, but instead of adding trailing parens, added a p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | erlend-aasland |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3542e147982176a7ebaa23dfb559c8af16f721c03ec560c68c56b64a0f35e751 |
| 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 | af80af7cc9e3de9c336f18b208a600950a3c187c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width