Skip to content

memoryview doesn't impl Sequence[T] #12780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
trim21 opened this issue Oct 11, 2024 · 0 comments · Fixed by #12781
Closed

memoryview doesn't impl Sequence[T] #12780

trim21 opened this issue Oct 11, 2024 · 0 comments · Fixed by #12781

Comments

@trim21
Copy link
Contributor

trim21 commented Oct 11, 2024

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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant