human
I wrote the below code

    global setVal
    class OldStyle:
        def __setitem__(self, index, value):
            global setVal
            setVal = (index, value)
    class OldStyleWithLen:
        def __setitem__(self, index, value):
            global setVal
            setVal = (index, value)
        def __len__(self):
            return 10
    class NewStyle(object, ):
        def __setitem__(self, index, value):
            global setVal
            setVal = (index, value)
    class OldStyleWithLenAndGetSlice:
        def __setitem__(self, index, value):
            global setVal
            setVal = (index, value)
        def __len__(self):
            return 10
        def __setslice__(self, start, stop, value):
            global setVal
            setVal = (start, stop, value)
    NewStyle()[slice(None, (-1), None)] = 123
    AreEqual(setVal, (slice(None, (-1), None), 123))
    OldStyleWithLen()[slice(None, (-1), None)] = 123
    AreEqual(setVal, (slice(None, (-1), None), 123))
    OldStyle()[slice(None, (-1), None)] = 123
    AreEqual(setVal, (slice(None, (-1), None), 123))
    OldStyleWithLenAndGetSlice()[slice(None, (-1), None)] = 123
    AreEqual(setVal, (slice(None, (-1), None), 123))
    NewStyle()[:(-1)] = 123
    AreEqual(setVal, (slice(None, (-1), None), 123))
    OldStyleWithLen()[:(-1)] = 123
    AreEqual(setVal, (slice(0, 9, None), 123))
    OldStyleWithLenAndGetSlice()[:(-1)] = 123
    AreEqual(setVal, (0, 9, 123))
    OldStyle()[:(-1):1] = 123
    AreEqual(setVal, (slice(None, (-1), 1), 123))
    try:
        OldStyle()[:(-1)] = 123
        AssertUnreachable()
    except AttributeError:
        pass
    try:
        OldStyle()[(-1):] = 123
        AssertUnreachable()
    except AttributeError:
        pass
    OldStyle()[:(-1):None] = 123
    AreEqual(setVal, (slice(None, (-1), None), 123))
    OldStyle()[(-1)::None] = 123
    AreEqual(setVal, (slice((-1), None, None), 123))
    OldStyle()[:(-1):None] = 123
    AreEqual(setVal, (slice(None, (-1), None), 123))
    OldStyle()[(-1)::None] = 123
   ...

What's a good function header?
assistant
#Here's a good function header.

def test_oldclass_and_direct_set():