[issue33864] collections.abc.ByteString does not register memoryview
New submission from Jason Fried <me@jasonfried.info>: 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()? ---------- assignee: docs@python components: Documentation messages: 319557 nosy: docs@python, fried, lukasz.langa priority: normal severity: normal status: open title: collections.abc.ByteString does not register memoryview type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33864> _______________________________________
Josh Rosenberg <shadowranger+python@gmail.com> added the comment: 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. ---------- nosy: +josh.r _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33864> _______________________________________
Raymond Hettinger <raymond.hettinger@gmail.com> added the comment: The docs should be made more precise. Perhaps, "This type represents the types bytes, bytearray, and memoryview of byte sequences"? ---------- nosy: +rhettinger _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33864> _______________________________________
Change by Zackery Spytz <zspytz@gmail.com>: ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 5.0 -> 6.0 pull_requests: +20463 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21311 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33864> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset b40e434386cd94a367d4a256e3364771140160e7 by Zackery Spytz in branch 'master': bpo-33864: Clarify the docs for typing.ByteString (GH-21311) https://github.com/python/cpython/commit/b40e434386cd94a367d4a256e3364771140... ---------- nosy: +miss-islington _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33864> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +20464 pull_request: https://github.com/python/cpython/pull/21312 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33864> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +20465 pull_request: https://github.com/python/cpython/pull/21313 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33864> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset 1cbcf9833f26588a16b5b69d202df727dbd09968 by Miss Islington (bot) in branch '3.9': bpo-33864: Clarify the docs for typing.ByteString (GH-21311) https://github.com/python/cpython/commit/1cbcf9833f26588a16b5b69d202df727dbd... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33864> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset 6857ebefc048e316f948091946d337b5ada807a4 by Miss Islington (bot) in branch '3.8': bpo-33864: Clarify the docs for typing.ByteString (GH-21311) https://github.com/python/cpython/commit/6857ebefc048e316f948091946d337b5ada... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33864> _______________________________________
Change by Guido van Rossum <guido@python.org>: ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33864> _______________________________________
participants (6)
-
Guido van Rossum
-
Jason Fried
-
Josh Rosenberg
-
miss-islington
-
Raymond Hettinger
-
Zackery Spytz