Title: memoryview doesn't impl `Sequence[T]` · Issue #12780 · python/typeshed · GitHub
Open Graph Title: memoryview doesn't impl `Sequence[T]` · Issue #12780 · python/typeshed
X Title: memoryview doesn't impl `Sequence[T]` · Issue #12780 · python/typeshed
Description: typeshed/stdlib/builtins.pyi Line 837 in 2d31815 class memoryview(Sequence[_I]): Sequence[T] allow .index(T) but is not supported by memoryview: example, this pass mypy buf = memoryview(b"\x00\x01\x02\x03") print(buf.index(1))
Open Graph Description: typeshed/stdlib/builtins.pyi Line 837 in 2d31815 class memoryview(Sequence[_I]): Sequence[T] allow .index(T) but is not supported by memoryview: example, this pass mypy buf = memoryview(b"\x00\x01\...
X Description: typeshed/stdlib/builtins.pyi Line 837 in 2d31815 class memoryview(Sequence[_I]): Sequence[T] allow .index(T) but is not supported by memoryview: example, this pass mypy buf = memoryview(b"\x00...
Opengraph URL: https://github.com/python/typeshed/issues/12780
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"memoryview doesn't impl `Sequence[T]`","articleBody":"https://github.com/python/typeshed/blob/2d3181523295181193bdb81eddab212d1ffde868/stdlib/builtins.pyi#L837\r\n\r\n`Sequence[T]` allow `.index(T)` but is not supported by memoryview:\r\n\r\nexample, this pass mypy\r\n\r\n```python\r\nbuf = memoryview(b\"\\x00\\x01\\x02\\x03\")\r\n\r\nprint(buf.index(1))\r\n```","author":{"url":"https://github.com/trim21","@type":"Person","name":"trim21"},"datePublished":"2024-10-11T14:53:12Z","url":"https://github.com/python/typeshed/issues/12780"}
| 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:3cd2f39c-536f-b087-7d72-6dc270271fa0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB10:18020:D801CB:12017E4:6B005313 |
| html-safe-nonce | 3664c20427791b450c838f706f2a95f2eb9d3ca045989756f60a779b2a2d0f81 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjEwOjE4MDIwOkQ4MDFDQjoxMjAxN0U0OjZCMDA1MzEzIiwidmlzaXRvcl9pZCI6IjQyODEzODAwMTQxMzU0NjQ3MjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7062de4d2608483750c32026b3b8fde1e56e55520fa3adac54eb6446ad567f3a |
| hovercard-subject-tag | issue:2581578544 |
| 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/12780/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1ed2d17d6970fdf64832ae59f319250cb3029e59254c46d9193cc647417b817b/python/typeshed/issues/12780 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1ed2d17d6970fdf64832ae59f319250cb3029e59254c46d9193cc647417b817b/python/typeshed/issues/12780 |
| og:image:alt | typeshed/stdlib/builtins.pyi Line 837 in 2d31815 class memoryview(Sequence[_I]): Sequence[T] allow .index(T) but is not supported by memoryview: example, this pass mypy buf = memoryview(b"\x00\x01\... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | trim21 |
| hostname | github.com |
| expected-hostname | github.com |
| None | f420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb |
| 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 | 26e00df917aba0f128135dc073ea0c5e33a70d40 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width