def test_slice_delslice_forbidden():
 global setVal
 class foo:
  def __delslice__(self, i, j, value):
   global setVal
   setVal = (i, j, value)
  def __delitem__(self, index):
   global setVal
   setVal = index
 del foo()[::None]
 AreEqual(setVal, slice(None, None, None))
 del foo()[::None]
 AreEqual(setVal, slice(None, None, None))

def test_slice_delslice_forbidden ( ) : global setVal class foo : def __delslice__ ( self , i , j , value ) : global setVal setVal = ( i , j , value ) def __delitem__ ( self , index ) : global setVal setVal = index del foo ( ) [ : : None ] AreEqual ( setVal , slice ( None , None , None ) ) del foo ( ) [ : : None ] AreEqual ( setVal , slice ( None , None , None ) )
providing no value for step forbids calling __delslice__ .