objarray: Implement equality testing between arrays and other buffers.

This commit is contained in:
Paul Sokolovsky
2014-08-10 11:49:23 +03:00
parent 7133d91773
commit 5f930337bc
2 changed files with 28 additions and 0 deletions

View File

@@ -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