This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Eric.Wieser, amaury.forgeotdarc, belopolsky, meador.inge, skrah, teoliphant, terry.reedy
Date 2019-04-14.20:25:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1555273523.82.0.925482014155.issue32782@roundup.psfhosted.org>
In-reply-to
Content
https://docs.python.org/3/library/stdtypes.html#typememoryview
says "itemsize The size in bytes of each element of the memoryview"
Revising the code example to use an empty array:
>>> import array, struct
>>> m = memoryview(array.array('H', [0])
>>> m.itemsize
2
I agree that itemsize should also be non-zero for ctype formats.
History
Date User Action Args
2019-04-14 20:25:23terry.reedysetrecipients: + terry.reedy, teoliphant, amaury.forgeotdarc, belopolsky, skrah, meador.inge, Eric.Wieser
2019-04-14 20:25:23terry.reedysetmessageid: <1555273523.82.0.925482014155.issue32782@roundup.psfhosted.org>
2019-04-14 20:25:23terry.reedylinkissue32782 messages
2019-04-14 20:25:23terry.reedycreate