-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Open
Labels
enhancementFeature requests, new feature implementationsFeature requests, new feature implementationspy-coreRelates to py/ directory in sourceRelates to py/ directory in source
Description
Is there any reason that list
supports item deletion but bytearray
doesn't?
# list example
>>> ls = [1, 2, 3, 4]
>>> del ls[-2:]
>>> ls
[1, 2]
# bytearray example
>>> barr = bytearray(b"1234")
>>> del barr[-2:]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'bytearray' object doesn't support item deletion
CPython already supports item deletion for bytearray
. I've also searched MicroPython differences from CPython but I didn't find anything about this one.
Metadata
Metadata
Assignees
Labels
enhancementFeature requests, new feature implementationsFeature requests, new feature implementationspy-coreRelates to py/ directory in sourceRelates to py/ directory in source