#NEWLINE# def slice_value( self , start , stop , step ) : #NEWLINE# #INDENT# if ( ( start . __class__ is Const ) and ( stop . __class__ is Const ) and ( stop . value is not None ) and ( step . __class__ is Const ) ) : #NEWLINE# #INDENT# start_val = start . value #NEWLINE# if ( start_val is None ) : #NEWLINE# #INDENT# start_val = 0 #NEWLINE# #UNINDENT# step_val = step . value #NEWLINE# if ( step_val is None ) : #NEWLINE# #INDENT# step_val = 1 #NEWLINE# #UNINDENT# nelts = ( ( stop . value - start_val ) / start ) #NEWLINE# if ( nelts >= 0 ) : #NEWLINE# #INDENT# return ConstSlice ( nelts ) #NEWLINE# #UNINDENT# #UNINDENT# return Slice ( start , stop , step )