mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
objarray: Implement equality testing between arrays and other buffers.
This commit is contained in:
@@ -17,3 +17,12 @@ print(s)
|
||||
print(a[1:])
|
||||
print(a[:-1])
|
||||
print(a[2:3])
|
||||
|
||||
# Comparisons
|
||||
print(bytearray([1]) == bytearray([1]))
|
||||
print(bytearray([1]) == bytearray([2]))
|
||||
print(bytearray([1]) == b"1")
|
||||
print(b"1" == bytearray([1]))
|
||||
print(bytearray() == bytearray())
|
||||
|
||||
# TODO: other comparisons
|
||||
|
||||
Reference in New Issue
Block a user