SChunk.__setitem__#

SChunk.__setitem__(key, value)#

Set slice to value.

Parameters:
  • key (int or slice) – The index of the slice to update. Note that step parameter is not honored.

  • value (bytes-like object) – An object supporting the Buffer Protocol used to overwrite the slice.

Returns:

out

Return type:

None

Raises:
  • ValueError – If you cannot modify self. If the size to get is negative. If there is not enough space in value to update the slice. If start is greater than the SChunk nitems

  • RunTimeError – If some problem was detected.

  • IndexError – If step is not 1.

Notes

This method can also be used to append new data if key.stop is greater than the SChunk nitems.