Title: Two (possible) improvements at dataclasses.rst · Issue #91687 · python/cpython · GitHub
Open Graph Title: Two (possible) improvements at dataclasses.rst · Issue #91687 · python/cpython
X Title: Two (possible) improvements at dataclasses.rst · Issue #91687 · python/cpython
Description: Documentation Observed two possible improvements at dataclasses.rst One of the examples at line 705 is throwing an exception. I would kindly suggest to update x: List = [] by x: list = field(default_factory=list) to avoid the following e...
Open Graph Description: Documentation Observed two possible improvements at dataclasses.rst One of the examples at line 705 is throwing an exception. I would kindly suggest to update x: List = [] by x: list = field(defaul...
X Description: Documentation Observed two possible improvements at dataclasses.rst One of the examples at line 705 is throwing an exception. I would kindly suggest to update x: List = [] by x: list = field(defaul...
Opengraph URL: https://github.com/python/cpython/issues/91687
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Two (possible) improvements at dataclasses.rst","articleBody":"**Documentation**\r\n\r\nObserved two possible improvements at [dataclasses.rst](https://github.com/python/cpython/blob/main/Doc/library/dataclasses.rst) \r\n\r\n1. One of the examples at line 705 is throwing an exception. I would kindly suggest to update ```x: List = []``` by ```x: list = field(default_factory=list)``` to avoid the following exception: ```ValueError: mutable default \u003cclass 'list'\u003e for field x is not allowed: use default_factory```\r\n2. Remove trailing whitespace in line 745 to avoid exception with automated Azure PR Validation.\r\n\r\n@ericvsmith I would be more than happy to raise a PR for above.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-103773\n* gh-103774\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/xandrade","@type":"Person","name":"xandrade"},"datePublished":"2022-04-19T08:25:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/91687/cpython/issues/91687"}
| 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:3c6895e3-f5b7-2791-b058-f1d9fea3bffd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9EE8:8619D:9C161C:CFC1A1:696991F1 |
| html-safe-nonce | 90fe66a48a4369c018f5bf64f2327f86a827d29e804cac901ecdbf12e49962fb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RUU4Ojg2MTlEOjlDMTYxQzpDRkMxQTE6Njk2OTkxRjEiLCJ2aXNpdG9yX2lkIjoiNzkxNjU4MjgzNjcxNjAxNjExMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a3bbb399f05404f58c51cb3085f6d16c0032b2b41de281f01a5bf66df40dc39b |
| hovercard-subject-tag | issue:1207969298 |
| 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/91687/issue_layout |
| twitter:image | https://opengraph.githubassets.com/87171ac20b997a889bc24f1fdf64735e11c55089e9096ade3db5f43c280f36cf/python/cpython/issues/91687 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/87171ac20b997a889bc24f1fdf64735e11c55089e9096ade3db5f43c280f36cf/python/cpython/issues/91687 |
| og:image:alt | Documentation Observed two possible improvements at dataclasses.rst One of the examples at line 705 is throwing an exception. I would kindly suggest to update x: List = [] by x: list = field(defaul... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | xandrade |
| 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