parameters: (self, key)
return_statement: return self._objects[index]
docstring: Return class type by key.
docstring_summary: Return class type by key.
docstring_tokens: Return class type by key .
function: def __getitem__(self, key):
          """
          Return class type by key.
          """
          if isinstance(key, int):
              index = key
          elif isinstance(key, str):
              index = self._keys.index(key)
          else:
              raise TypeError("The supplied type must be 'int' or 'str' but {} given." \
                              .format(type(key).__name__))
  
          return self._objects[index]
function_tokens: def __getitem__ ( self , key ) : if isinstance ( key , int ) : index = key elif isinstance ( key , str ) : index = self . _keys . index ( key ) else : raise TypeError ( "The supplied type must be 'int' or 'str' but {} given." . format ( type ( key ) . __name__ ) ) return self . _objects [ index ]