Title: Add support of PyStructSequence in copy.replace() · Issue #110222 · python/cpython · GitHub
Open Graph Title: Add support of PyStructSequence in copy.replace() · Issue #110222 · python/cpython
X Title: Add support of PyStructSequence in copy.replace() · Issue #110222 · python/cpython
Description: Feature or enhancement Proposal: This issue is to make the concept of "named tuple" support the __replace__ protocol. collections.namedtuple and typing.NamedTuple already support the __replace__ protocol in: #108752 PyStructSequences are...
Open Graph Description: Feature or enhancement Proposal: This issue is to make the concept of "named tuple" support the __replace__ protocol. collections.namedtuple and typing.NamedTuple already support the __replace__ pr...
X Description: Feature or enhancement Proposal: This issue is to make the concept of "named tuple" support the __replace__ protocol. collections.namedtuple and typing.NamedTuple already support the __re...
Opengraph URL: https://github.com/python/cpython/issues/110222
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add support of PyStructSequence in copy.replace()","articleBody":"# Feature or enhancement\r\n\r\n### Proposal:\r\n\r\nThis issue is to make the concept of [\"named tuple\"](https://docs.python.org/3/glossary.html#term-named-tuple) support the `__replace__` protocol.\r\n\r\n`collections.namedtuple` and `typing.NamedTuple` already support the `__replace__` protocol in:\r\n\r\n- #108752\r\n\r\n[`PyStructSequence`](https://docs.python.org/3/c-api/tuple.html#struct-sequence-objects)s are also [named tuples](https://docs.python.org/3/glossary.html#term-named-tuple) but they do not support the `__replace__` protocol yet.\r\n\r\nIt would be convenient if `PyStructSequence` be supported in `copy.replace()`.\r\n\r\n### Has this already been discussed elsewhere?\r\n\r\nI have already discussed this feature proposal on Discourse\r\n\r\n### Links to previous discussion of this feature:\r\n\r\n- #108751\r\n- https://discuss.python.org/t/generalize-replace-function/28511\r\n- #109956\r\n- #109174\r\n- #109175\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-110223\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/XuehaiPan","@type":"Person","name":"XuehaiPan"},"datePublished":"2023-10-02T14:53:56Z","url":"https://github.com/python/cpython/issues/110222"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:e472d56c-c13c-e9ca-b802-ddc07256cab5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A8AA:3B4979:11D687:18DCC1:6B005469 |
| html-safe-nonce | b1d589c39c3b0ce59f5e21c0fb5ab41978b6338c72c114fd5cd6c222e3da055f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOEFBOjNCNDk3OToxMUQ2ODc6MThEQ0MxOjZCMDA1NDY5IiwidmlzaXRvcl9pZCI6IjI1NjI2MzYxMTYzMzk0Nzk2NTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 950bd50f141366b7e93141d2bd4fd00ed524e86b428ccdcfb9128ee4d4109b5b |
| hovercard-subject-tag | issue:1922084060 |
| 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/110222/issue_layout |
| twitter:image | https://opengraph.githubassets.com/395407fa5a0c4fe65edde0b1004fc262dcc928c91ffbca7d52dae1d271635edb/python/cpython/issues/110222 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/395407fa5a0c4fe65edde0b1004fc262dcc928c91ffbca7d52dae1d271635edb/python/cpython/issues/110222 |
| og:image:alt | Feature or enhancement Proposal: This issue is to make the concept of "named tuple" support the __replace__ protocol. collections.namedtuple and typing.NamedTuple already support the __replace__ pr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | XuehaiPan |
| hostname | github.com |
| expected-hostname | github.com |
| None | f420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb |
| 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 | 26e00df917aba0f128135dc073ea0c5e33a70d40 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width