You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
collections.abc.ByteString does not register memoryview #78045
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2020-07-04.04:23:04.205>created_at=<Date2018-06-14.21:43:36.836>labels= ['3.8', 'type-bug', '3.7', 'docs']
title='collections.abc.ByteString does not register memoryview'updated_at=<Date2020-07-04.04:23:04.205>user='https://github.com/fried'
memoryview isn't just for bytes strings though; the format can make it a sequence of many types of different widths, meanings, etc. Calling it a BytesString would be misleading in many cases.
Activity
fried commentedon Jun 14, 2018
Looking at the typing Module docs in the section for ByteString
This type represents the types bytes, bytearray, and memoryview.
But collections.abc.ByteString does not have memoryview registered.
Is it because memoryview doesn't support .index()?
MojoVampire commentedon Jun 15, 2018
memoryview isn't just for bytes strings though; the format can make it a sequence of many types of different widths, meanings, etc. Calling it a BytesString would be misleading in many cases.
rhettinger commentedon Jun 16, 2018
The docs should be made more precise. Perhaps, "This type represents the types bytes, bytearray, and memoryview of byte sequences"?
miss-islington commentedon Jul 4, 2020
New changeset b40e434 by Zackery Spytz in branch 'master':
bpo-33864: Clarify the docs for typing.ByteString (GH-21311)
b40e434
miss-islington commentedon Jul 4, 2020
New changeset 1cbcf98 by Miss Islington (bot) in branch '3.9':
bpo-33864: Clarify the docs for typing.ByteString (GH-21311)
1cbcf98
miss-islington commentedon Jul 4, 2020
New changeset 6857ebe by Miss Islington (bot) in branch '3.8':
bpo-33864: Clarify the docs for typing.ByteString (GH-21311)
6857ebe