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 Jonathan Booth
Recipients Jonathan Booth, docs@python
Date 2016-04-21.19:07:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461265661.42.0.761639464385.issue26821@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-04-21 19:07:41Jonathan Boothsetrecipients: + Jonathan Booth, docs@python
2016-04-21 19:07:41Jonathan Boothsetmessageid: <1461265661.42.0.761639464385.issue26821@psf.upfronthosting.co.za>
2016-04-21 19:07:41Jonathan Boothlinkissue26821 messages
2016-04-21 19:07:41Jonathan Boothcreate