mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 12:40:15 +01:00
py/objarray: Disallow memoryview addition.
Following CPython. This is important for subsequent commits to work correctly. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -6,8 +6,18 @@ except:
|
||||
raise SystemExit
|
||||
|
||||
# unsupported binary operators
|
||||
try:
|
||||
memoryview(b"") + b""
|
||||
except TypeError:
|
||||
print("TypeError")
|
||||
|
||||
try:
|
||||
memoryview(b"") + memoryview(b"")
|
||||
except TypeError:
|
||||
print("TypeError")
|
||||
|
||||
try:
|
||||
m = memoryview(bytearray())
|
||||
m += bytearray()
|
||||
except TypeError:
|
||||
print('TypeError')
|
||||
print("TypeError")
|
||||
|
||||
Reference in New Issue
Block a user