parameters: (self, path)
return_statement: return path
docstring: Map `path` through the aliases.
  
          `path` is checked against all of the patterns.  The first pattern to
          match is used to replace the root of the path with the result root.
          Only one pattern is ever used.  If no patterns match, `path` is
          returned unchanged.
  
          The separator style in the result is made to match that of the result
          in the alias.
  
          Returns the mapped path.  If a mapping has happened, this is a
          canonical path.  If no mapping has happened, it is the original value
          of `path` unchanged.
docstring_summary: Map `path` through the aliases.
docstring_tokens: Map path through the aliases .
function: def map(self, path):
          """Map `path` through the aliases.
  
          `path` is checked against all of the patterns.  The first pattern to
          match is used to replace the root of the path with the result root.
          Only one pattern is ever used.  If no patterns match, `path` is
          returned unchanged.
  
          The separator style in the result is made to match that of the result
          in the alias.
  
          Returns the mapped path.  If a mapping has happened, this is a
          canonical path.  If no mapping has happened, it is the original value
          of `path` unchanged.
  
          """
          for regex, result, pattern_sep, result_sep in self.aliases:
              m = regex.match(path)
              if m:
                  new = path.replace(m.group(0), result)
                  if pattern_sep != result_sep:
                      new = new.replace(pattern_sep, result_sep)
                  new = canonical_filename(new)
                  return new
          return path
function_tokens: def map ( self , path ) : for regex , result , pattern_sep , result_sep in self . aliases : m = regex . match ( path ) if m : new = path . replace ( m . group ( 0 ) , result ) if pattern_sep != result_sep : new = new . replace ( pattern_sep , result_sep ) new = canonical_filename ( new ) return new return path