array.itemsize: Documentation Versus Reality
Lawrence D’Oliveiro
lawrencedo99 at gmail.com
Sat Sep 17 20:17:59 EDT 2016
On Saturday, September 17, 2016 at 3:47:15 PM UTC+12, I wrote:
> >>> a = array.array("I", (0,))
> >>> a.itemsize
> 4
> >>> a = array.array("L", (0,))
> >>> a.itemsize
> 8
Let me rephrase the question. It seems clear <https://docs.python.org/3/library/array.html> that “l” and “L” are not be relied on. As far as I can tell, on all current Python implementations, “i” and “I” have item sizes of 4, while “q” and “Q” have item sizes of 8.
Can anybody offer any counterexamples? If not, why does the documentation suggest that “i” and “I” could have an item size of 2?
More information about the Python-list
mailing list