8491eb190f
As per https://bugs.python.org/issue408326, the slice object should not be hashable. Since MicroPython has an implicit fallback when the unary_op slot is empty, we need to fill this slot. Signed-off-by: David Lechner <david@pybricks.com>
16 lines
276 B
Python
16 lines
276 B
Python
|
|
try:
|
|
t = [][:]
|
|
except:
|
|
print("SKIP")
|
|
raise SystemExit
|
|
|
|
|
|
# REVISIT: slice comparison operators are not implemented in MicroPython
|
|
|
|
# test that slice is not hashable, i.e. it can't be used to copy a dict
|
|
try:
|
|
{}[:] = {}
|
|
except TypeError:
|
|
print('TypeError')
|