Title: gh-98963: Add a note to the error for property subclasses without __doc__ by encukou · Pull Request #99058 · python/cpython · GitHub
Open Graph Title: gh-98963: Add a note to the error for property subclasses without __doc__ by encukou · Pull Request #99058 · python/cpython
X Title: gh-98963: Add a note to the error for property subclasses without __doc__ by encukou · Pull Request #99058 · python/cpython
Description: Subclasses created using the C API don't get __dict__, which means their __doc__ can't be set for each property separately. The __doc__ descriptor from property itself is shadowed by the subclass's docstring. This edge case isn't really worth mentioning in the docs. This adds a note that should guide anyone encountering the issue to the right fix. The newfangled __notes__ mechanism is as non-invasive as it gets -- it even retains the original exception object -- while getting the information to the surprised user. (The message is longer than typical error messages, but IMO it's better to explain here than in the docs, where 99%+ of the readers don't need it.) Issue: gh-98963
Open Graph Description: Subclasses created using the C API don't get __dict__, which means their __doc__ can't be set for each property separately. The __doc__ descriptor from property itself is shadowed by the su...
X Description: Subclasses created using the C API don't get __dict__, which means their __doc__ can't be set for each property separately. The __doc__ descriptor from property itself is shadowed b...
Opengraph URL: https://github.com/python/cpython/pull/99058
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:467f9435-cdab-88b7-2740-fdd2ae9c7290 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | AB5C:FB3A6:6BC6FD:93648F:6969DEA3 |
| html-safe-nonce | 31a916d5352a3803e62e7575db5aa8e4073e1551b9f6d5b0cb868c2c7f6630db |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjVDOkZCM0E2OjZCQzZGRDo5MzY0OEY6Njk2OURFQTMiLCJ2aXNpdG9yX2lkIjoiODk1NjQzODQ4MTE0NzEyNTQxMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1467495dc85a0b032890dcd43db327a15c763216c9c3b401fbe713670ad2b2ec |
| hovercard-subject-tag | pull_request:1109631749 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/python/cpython/pull/99058/checks |
| twitter:image | https://avatars.githubusercontent.com/u/302922?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/302922?s=400&v=4 |
| og:image:alt | Subclasses created using the C API don't get __dict__, which means their __doc__ can't be set for each property separately. The __doc__ descriptor from property itself is shadowed by the su... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width