Title: gh-91162: Implement splitting of *tuple[int, ...] over `T, *Ts` in typing.py by mrahtz · Pull Request #93318 · python/cpython · GitHub
Open Graph Title: gh-91162: Implement splitting of *tuple[int, ...] over `T, *Ts` in typing.py by mrahtz · Pull Request #93318 · python/cpython
X Title: gh-91162: Implement splitting of *tuple[int, ...] over `T, *Ts` in typing.py by mrahtz · Pull Request #93318 · python/cpython
Description: In #91162, we decided that it should be valid to do T = TypeVar('T') Ts = TypeVarTuple('Ts') Alias = tuple[T, *Ts] Alias[*tuple[int, ...]] and that the result should be tuple[int, *tuple[int, ...]]. This PR does the first half of the work necessary to enable this: the changes necessary in typing.py. The second half will be the equivalent machinery in genericaliasobject.c, but I'll do that in a separate PR, since I guess different people will want to review it.
Open Graph Description: In #91162, we decided that it should be valid to do T = TypeVar('T') Ts = TypeVarTuple('Ts') Alias = tuple[T, *Ts] Alias[*tuple[int, ...]] and that the result should be tuple[int,...
X Description: In #91162, we decided that it should be valid to do T = TypeVar('T') Ts = TypeVarTuple('Ts') Alias = tuple[T, *Ts] Alias[*tuple[int, ...]] and that the result shou...
Opengraph URL: https://github.com/python/cpython/pull/93318
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7e1e70e0-35ce-46ba-f08d-12ae005d34d3 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C44A:155BED:553DA1:7646F7:696A76CE |
| html-safe-nonce | 399c9ccf5903a8671509156eda4cdc1acfd3e81c87a05cb05aae9e6650532390 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDRBOjE1NUJFRDo1NTNEQTE6NzY0NkY3OjY5NkE3NkNFIiwidmlzaXRvcl9pZCI6IjU2NzE5OTgwNDQxMDIwOTY1OTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e4ccd2a97f49a7bb632afd4f9d3befbb0deab4c2e56651ccd1f4c68c3d1effc3 |
| hovercard-subject-tag | pull_request:950058853 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/93318/files |
| twitter:image | https://avatars.githubusercontent.com/u/4431336?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4431336?s=400&v=4 |
| og:image:alt | In #91162, we decided that it should be valid to do T = TypeVar('T') Ts = TypeVarTuple('Ts') Alias = tuple[T, *Ts] Alias[*tuple[int, ...]] and that the result should be tuple[int,... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cfa223d62d272274e0b68350b4bd7741f3ca7498b8c4b8b1bc1e6deabbdbc09d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6a0b6893c221f98f607598e939299fdf5763435d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width