class Itemtest(object):

    def __init__(self, name):
        self.name = name

def __repr__(self):
    return self.name

def __setitem__(self, item, value):
    print('__setitem__', self, item, value)

def __getitem__(self, item):
    print('__getitem__', self, item)
return Itemtest('inner')
a = Itemtest('outer')
a[0:1] = [4]
temp = a[0:1]
temp[0] = 4
a[0:1][0] = 4
slice in python, is a copy or just a pointer