def add(self, dist):
if self.can_add(dist) and dist.has_version():<EOL><INDENT>dists = self._distmap.setdefault(dist.key, [])<EOL>if dist not in dists:<EOL><INDENT>dists.append(dist)<EOL>dists.sort(key=operator.attrgetter('<STR_LIT>'), reverse=True)<EOL><DEDENT><DEDENT>
Add `dist` if we ``can_add()`` it and it has not already been added