summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/slice_op.py
blob: 0bb6e365bfd8569a4845d6d1264a533de1727b09 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Test slice unary operations.
# CPython allows hashing slices, but MicroPython does not.

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')