()
Call the invalidate_caches() method on all path entry finders
        stored in sys.path_importer_caches (where implemented).
Call the invalidate_caches() method on all path entry finders
        stored in sys.path_importer_caches (where implemented).
Call the invalidate_caches () method on all path entry finders stored in sys . path_importer_caches ( where implemented ) .
def invalidate_caches():
        """Call the invalidate_caches() method on all path entry finders
        stored in sys.path_importer_caches (where implemented)."""
        for name, finder in list(sys.path_importer_cache.items()):
            if finder is None:
                del sys.path_importer_cache[name]
            elif hasattr(finder, 'invalidate_caches'):
                finder.invalidate_caches()
def invalidate_caches ( ) : for name , finder in list ( sys . path_importer_cache . items ( ) ) : if finder is None : del sys . path_importer_cache [ name ] elif hasattr ( finder , 'invalidate_caches' ) : finder . invalidate_caches ( )