def get_distributions(self):
if not self._cache_enabled:<EOL><INDENT>for dist in self._yield_distributions():<EOL><INDENT>yield dist<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self._generate_cache()<EOL>for dist in self._cache.path.values():<EOL><INDENT>yield dist<EOL><DEDENT>if self._include_egg:<EOL><INDENT>for dist in self._cache_egg.path.values():<EOL><INDENT>yield dist<EOL><DEDENT><DEDENT><DEDENT>
Provides an iterator that looks for distributions and returns
:class:`InstalledDistribution` or
:class:`EggInfoDistribution` instances for each one of them.

:rtype: iterator of :class:`InstalledDistribution` and
        :class:`EggInfoDistribution` instances