[docs] [issue26821] array module "minimum size in bytes" table is wrong for int/long

Jonathan Booth report at bugs.python.org
Thu Apr 21 15:07:41 EDT 2016


New submission from Jonathan Booth:

https://docs.python.org/3.5/library/array.html describes the 'I' and 'i' typecodes as being minimum-size in bytes of 2. The interpreter disagrees:

>>> import array
>>> a = array.array('i')
>>> a.itemsize
4

There is also a bug with the 'L' and 'l' long typecodes, which document as min-size of 4 bytes but are 8 bytes in the interpreter. That could be a bug in cPython itself though, as if 'L' should be 8 bytes, that disagrees with the type code sizing from the struct module, where it is 4 bytes, just like integers.

I checked documentation for all versions of python and it matches -- I did not check all python interpreters to see they match, but 2.7 and 3.5 did.

----------
assignee: docs at python
components: Documentation
messages: 263931
nosy: Jonathan Booth, docs at python
priority: normal
severity: normal
status: open
title: array module "minimum size in bytes" table is wrong for int/long
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26821>
_______________________________________


More information about the docs mailing list