Class `bytearray()` does not implement `count()`
I just noticed that micropython apparently doesn't implement the count() method for class bytearray().
Since it's a basic built-in class/type and I didn't find it anywhere mentioned (docs/issues), I figured it might be worth dropping it here.
CPython:
bytearray(b'foobar').count(b'o')
2
MicroPython:
>>> bytearray(b'foobar').count(b'o')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'bytearray' object has no attribute 'count'
bytesarray buffer manipulation/copy fail
Hello,
I'm not a big expert at this, so I googled a little and found this topic:
https://stackoverflow.com/questions/10633881/how-to-copy-a-python-bytearray-buffer
but it do not work for me:
`c=b'\x11\x11'
a=b'\xff\xff'
a[:]=c
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'bytes' object doesn't support item assignment`
Also tried to change in lots of way value of any byte in the array it returns same error. Did I do something wrong or there is something not yet implemented?