Message263931
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. |
|
Date |
User |
Action |
Args |
2016-04-21 19:07:41 | Jonathan Booth | set | recipients:
+ Jonathan Booth, docs@python |
2016-04-21 19:07:41 | Jonathan Booth | set | messageid: <1461265661.42.0.761639464385.issue26821@psf.upfronthosting.co.za> |
2016-04-21 19:07:41 | Jonathan Booth | link | issue26821 messages |
2016-04-21 19:07:41 | Jonathan Booth | create | |
|