Title: `slice` constructors are broken when using `None` · Issue #13376 · python/typeshed · GitHub
Open Graph Title: `slice` constructors are broken when using `None` · Issue #13376 · python/typeshed
X Title: `slice` constructors are broken when using `None` · Issue #13376 · python/typeshed
Description: a: slice[None, None, None] = slice(None, None, None) Incompatible types in assignment (expression has type "slice[int | Any, int | Any, int | Any]", variable has type "slice[None, None, None]") playground typeshed/stdlib/builtins.pyi Lin...
Open Graph Description: a: slice[None, None, None] = slice(None, None, None) Incompatible types in assignment (expression has type "slice[int | Any, int | Any, int | Any]", variable has type "slice[None, None, None]") pla...
X Description: a: slice[None, None, None] = slice(None, None, None) Incompatible types in assignment (expression has type "slice[int | Any, int | Any, int | Any]", variable has type "slice[None, No...
Opengraph URL: https://github.com/python/typeshed/issues/13376
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`slice` constructors are broken when using `None`","articleBody":"```py\r\na: slice[None, None, None] = slice(None, None, None)\r\n```\r\n```\r\nIncompatible types in assignment (expression has type \"slice[int | Any, int | Any, int | Any]\", variable has type \"slice[None, None, None]\")\r\n```\r\n[playground](https://basedpyright.com/?pythonVersion=3.10&typeCheckingMode=all&code=IYLgBAzgNglgxgUwNoDkD2A7BAaM6u74IC6YAvJLIgBRGGY54MCUAsAFBA)\r\n\r\nhttps://github.com/python/typeshed/blob/dc1ce5f5679359e53dcb84073312cd472840eb98/stdlib/builtins.pyi#L952-L955\r\n\r\nfound here: https://github.com/data-apis/array-api-extra/pull/82#discussion_r1905855564","author":{"url":"https://github.com/KotlinIsland","@type":"Person","name":"KotlinIsland"},"datePublished":"2025-01-08T03:23:30Z","url":"https://github.com/python/typeshed/issues/13376"}
| 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:1feded67-e33b-286c-2e75-0319a1d74b54 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CEE8:1BCD46:36C9E7:49B6D3:6B00292E |
| html-safe-nonce | 34c8e9de2325e76aed5cb3d0ad0cda47a890334e1ca09374594e621a440abf8a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRUU4OjFCQ0Q0NjozNkM5RTc6NDlCNkQzOjZCMDAyOTJFIiwidmlzaXRvcl9pZCI6IjcwODkzNzE4MDA1MjU2MTMzNTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2309353e212ee752d280c44b7da30020a2f8e6610a96c24a8c54c69d315a2742 |
| hovercard-subject-tag | issue:2774172386 |
| 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/typeshed/13376/issue_layout |
| twitter:image | https://opengraph.githubassets.com/75e5d13e25236c130ad62af09d8718bca1564074742bf9cda6c235cb03767f1c/python/typeshed/issues/13376 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/75e5d13e25236c130ad62af09d8718bca1564074742bf9cda6c235cb03767f1c/python/typeshed/issues/13376 |
| og:image:alt | a: slice[None, None, None] = slice(None, None, None) Incompatible types in assignment (expression has type "slice[int | Any, int | Any, int | Any]", variable has type "slice[None, None, None]") pla... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KotlinIsland |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width