parameters: (self, dist, entry=None, insert=True, replace=False)
docstring: Add `dist` to working set, associated with `entry`
  
          If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
          On exit from this routine, `entry` is added to the end of the working
          set's ``.entries`` (if it wasn't already present).
  
          `dist` is only added to the working set if it's for a project that
          doesn't already have a distribution in the set, unless `replace=True`.
          If it's added, any callbacks registered with the ``subscribe()`` method
          will be called.
docstring_summary: Add `dist` to working set, associated with `entry`
docstring_tokens: Add dist to working set associated with entry
function: def add(self, dist, entry=None, insert=True, replace=False):
          """Add `dist` to working set, associated with `entry`
  
          If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
          On exit from this routine, `entry` is added to the end of the working
          set's ``.entries`` (if it wasn't already present).
  
          `dist` is only added to the working set if it's for a project that
          doesn't already have a distribution in the set, unless `replace=True`.
          If it's added, any callbacks registered with the ``subscribe()`` method
          will be called.
          """
          if insert:
              dist.insert_on(self.entries, entry, replace=replace)
  
          if entry is None:
              entry = dist.location
          keys = self.entry_keys.setdefault(entry, [])
          keys2 = self.entry_keys.setdefault(dist.location, [])
          if not replace and dist.key in self.by_key:
              # ignore hidden distros
              return
  
          self.by_key[dist.key] = dist
          if dist.key not in keys:
              keys.append(dist.key)
          if dist.key not in keys2:
              keys2.append(dist.key)
          self._added_new(dist)
function_tokens: def add ( self , dist , entry = None , insert = True , replace = False ) : if insert : dist . insert_on ( self . entries , entry , replace = replace ) if entry is None : entry = dist . location keys = self . entry_keys . setdefault ( entry , [ ] ) keys2 = self . entry_keys . setdefault ( dist . location , [ ] ) if not replace and dist . key in self . by_key : # ignore hidden distros return self . by_key [ dist . key ] = dist if dist . key not in keys : keys . append ( dist . key ) if dist . key not in keys2 : keys2 . append ( dist . key ) self . _added_new ( dist )