array.itemsize: Documentation Versus Reality

Chris Angelico rosuav at gmail.com
Sat Sep 17 23:55:45 EDT 2016


On Sun, Sep 18, 2016 at 1:16 PM, Lawrence D’Oliveiro
<lawrencedo99 at gmail.com> wrote:
> On Sunday, September 18, 2016 at 2:34:46 PM UTC+12, eryk sun wrote:
>> However, I see that MicroPython [1] has been ported to 16-bit
>> PIC microcontrollers. An int should be 16-bit in that case.
>>
>> [1]: https://github.com/micropython/micropython
>
> From the readme: “MicroPython implements the entire Python 3.4 syntax...”
>
> Darn. I don’t know whether to applaud or grit my teeth...

What do you mean? It's not perfectly up-to-date with respect to
CPython, but most alternate implementations lag a bit.

However, it doesn't appear to have an 'itemsize' on its array.

>>> a=array.array("l", (0,))
>>> dir(a)
['append', 'extend']

Not sure what that means about its sizes.

ChrisA



More information about the Python-list mailing list