parameters: (self, req)
return_statement: return dist
docstring: Find a distribution matching requirement `req`
  
          If there is an active distribution for the requested project, this
          returns it as long as it meets the version requirement specified by
          `req`.  But, if there is an active distribution for the project and it
          does *not* meet the `req` requirement, ``VersionConflict`` is raised.
          If there is no active distribution for the requested project, ``None``
          is returned.
docstring_summary: Find a distribution matching requirement `req`
docstring_tokens: Find a distribution matching requirement req
function: def find(self, req):
          """Find a distribution matching requirement `req`
  
          If there is an active distribution for the requested project, this
          returns it as long as it meets the version requirement specified by
          `req`.  But, if there is an active distribution for the project and it
          does *not* meet the `req` requirement, ``VersionConflict`` is raised.
          If there is no active distribution for the requested project, ``None``
          is returned.
          """
          dist = self.by_key.get(req.key)
          if dist is not None and dist not in req:
              # XXX add more info
              raise VersionConflict(dist, req)
          return dist
function_tokens: def find ( self , req ) : dist = self . by_key . get ( req . key ) if dist is not None and dist not in req : # XXX add more info raise VersionConflict ( dist , req ) return dist