Skip to content

Enable MICROPY_PY_ARRAY_SLICE_ASSIGN on SAMD21 #193

@deshipu

Description

@deshipu

The following code:

a = bytearray(b'abc')
a[1:2] = b'123'

works just fine on MicroPython and CircuitPython on the ESP8266, but fails with

TypeError: 'bytearray' object does not support item assignment

on the M0 boards. This is the fastest way to copy a fragment of a byte array (since it uses memcpy in C), but since it doesn't work consistently on all ports, I can't use it in my libraries. It would be nice if all ports supported it.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions