#NEWLINE# def get_distributions( self ) : #NEWLINE# #INDENT# '\n        Provides an iterator that looks for distributions and returns\n        :class:`InstalledDistribution` or\n        :class:`EggInfoDistribution` instances for each one of them.\n\n        :rtype: iterator of :class:`InstalledDistribution` and\n                :class:`EggInfoDistribution` instances\n        ' #NEWLINE# if ( not dist . _cache_enabled ) : #NEWLINE# #INDENT# for dist in self . _yield_distributions ( ) : #NEWLINE# #INDENT# ( yield dist ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . _generate_cache ( ) #NEWLINE# for dist in self . _cache . path . values ( ) : #NEWLINE# #INDENT# ( yield dist ) #NEWLINE# #UNINDENT# if self . _include_egg : #NEWLINE# #INDENT# for dist in self . _cache_egg . path . values ( ) : #NEWLINE# #INDENT# ( yield dist )