def __setitem__(self, index, data):
if ((isinstance(index, slice) and<EOL>(index.start is None and<EOL>index.stop is None and<EOL>index.step is None)) or (index is Ellipsis)):<EOL><INDENT>self._write(data)<EOL><DEDENT>else:<EOL><INDENT>msg = "<STR_LIT>"<EOL>raise TypeError(msg)<EOL><DEDENT>
Slicing protocol.