def create_index_types(evaluator, index):
 if (index == ':'):
  return set([Slice(evaluator, None, None, None)])
 elif tree.is_node(index, 'subscript'):
  result = []
  for el in index.children:
   if (el == ':'):
    if (not result):
     result.append(None)
   elif tree.is_node(el, 'sliceop'):
    if (len(el.children) == 2):
     result.append(el.children[1])
   else:
    result.append(el)
  result += ([None] * (3 - len(result)))
  return set([Slice(evaluator, *result)])
 return evaluator.eval_element(index)

def create_index_types ( evaluator , index ) : if ( index == ':' ) : return set ( [ Slice ( evaluator , None , None , None ) ] ) elif tree . is_node ( index , 'subscript' ) : result = [ ] for el in index . children : if ( el == ':' ) : if ( not result ) : result . append ( None ) elif tree . is_node ( el , 'sliceop' ) : if ( len ( el . children ) == 2 ) : result . append ( el . children [ 1 ] ) else : result . append ( el ) result += ( [ None ] * ( 3 - len ( result ) ) ) return set ( [ Slice ( evaluator , * result ) ] ) return evaluator . eval_element ( index )
handles slices in subscript nodes .