if attr equals any of the strings "__file__", "__name__" or "__path__" and self.mod is not contained in sys.modules,
if ( attr in ( "__file__" , "__name__" , "__path__" ) and self . mod not in sys . modules ) :