parameters: (self,name)
docstring: Retrieves a named Direction.
docstring_summary: Retrieves a named Direction.
docstring_tokens: Retrieves a named Direction .
function: def getDirection(self,name):
          """Retrieves a named Direction."""
          if isinstance(name,Direction): return name
          try:
              return self.directions[name]
          except KeyError:
              #try looking through groups
              splits = name.split(":",1)
              if len(splits)==1:
                  raise ValueError("Direction "+name+" does not exist")
              if splits[0] not in self.subgroups:
                  raise ValueError("Direction "+name+" or subgroup "+splits[0]+" do not exist")
              return self.subgroups[splits[0]].getDirection(splits[1])
function_tokens: def getDirection ( self , name ) : if isinstance ( name , Direction ) : return name try : return self . directions [ name ] except KeyError : #try looking through groups splits = name . split ( ":" , 1 ) if len ( splits ) == 1 : raise ValueError ( "Direction " + name + " does not exist" ) if splits [ 0 ] not in self . subgroups : raise ValueError ( "Direction " + name + " or subgroup " + splits [ 0 ] + " do not exist" ) return self . subgroups [ splits [ 0 ] ] . getDirection ( splits [ 1 ] )