def normalize_slice(s):
 (start, stop, step) = (s.start, s.stop, s.step)
 if (start is None):
  start = 0
 if (step is None):
  step = 1
 if ((start < 0) or (step < 0) or ((stop is not None) and (stop < 0))):
  raise NotImplementedError()
 return slice(start, stop, step)

def normalize_slice ( s ) : ( start , stop , step ) = ( s . start , s . stop , s . step ) if ( start is None ) : start = 0 if ( step is None ) : step = 1 if ( ( start < 0 ) or ( step < 0 ) or ( ( stop is not None ) and ( stop < 0 ) ) ) : raise NotImplementedError ( ) return slice ( start , stop , step )
replace nones in slices with integers .