parameters: (self, dist)
docstring: Add `dist` if we ``can_add()`` it and it has not already been added
docstring_summary: Add `dist` if we ``can_add()`` it and it has not already been added
docstring_tokens: Add dist if we can_add () it and it has not already been added
function: def add(self, dist):
  
          """Add `dist` if we ``can_add()`` it and it has not already been added
  
          """
  
          if self.can_add(dist) and dist.has_version():
  
              dists = self._distmap.setdefault(dist.key, [])
  
              if dist not in dists:
  
                  dists.append(dist)
  
                  dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
function_tokens: def add ( self , dist ) : if self . can_add ( dist ) and dist . has_version ( ) : dists = self . _distmap . setdefault ( dist . key , [ ] ) if dist not in dists : dists . append ( dist ) dists . sort ( key = operator . attrgetter ( 'hashcmp' ) , reverse = True )