parameters: (self, mixed_index)
return_statement: return self._follow_values(values)
docstring: Here the index is an int/str. Raises IndexError/KeyError
docstring_summary: Here the index is an int/str. Raises IndexError/KeyError
docstring_tokens: Here the index is an int / str . Raises IndexError / KeyError
function: def get_exact_index_types(self, mixed_index):
          """ Here the index is an int/str. Raises IndexError/KeyError """
          index = mixed_index
          if self.type == pr.Array.DICT:
              index = None
              for i, key_statement in enumerate(self._array.keys):
                  # Because we only want the key to be a string.
                  key_commands = key_statement.get_commands()
                  if len(key_commands) != 1:  # cannot deal with complex strings
                      continue
                  key = key_commands[0]
                  if isinstance(key, pr.String):
                      str_key = key.value
                  elif isinstance(key, pr.Name):
                      str_key = str(key)
  
                  if mixed_index == str_key:
                      index = i
                      break
              if index is None:
                  raise KeyError('No key found in dictionary')
  
          # Can raise an IndexError
          values = [self._array.values[index]]
          return self._follow_values(values)
function_tokens: def get_exact_index_types ( self , mixed_index ) : index = mixed_index if self . type == pr . Array . DICT : index = None for i , key_statement in enumerate ( self . _array . keys ) : # Because we only want the key to be a string. key_commands = key_statement . get_commands ( ) if len ( key_commands ) != 1 : # cannot deal with complex strings continue key = key_commands [ 0 ] if isinstance ( key , pr . String ) : str_key = key . value elif isinstance ( key , pr . Name ) : str_key = str ( key ) if mixed_index == str_key : index = i break if index is None : raise KeyError ( 'No key found in dictionary' ) # Can raise an IndexError values = [ self . _array . values [ index ] ] return self . _follow_values ( values )