slice has 4 attributes, but the add_slice function only takes the first 3, leaving out mode. If the 4th input fill_value is specified, the following error is thrown ...
Add a description, image, and links to the slice-operator-in-python topic page so that developers can more easily learn about it.