def has_filename_filter(module):
 return (getattr(module, 'filename', None) is not None)

def has_filename_filter ( module ) : return ( getattr ( module , 'filename' , None ) is not None )
return false if the module does not have a filename attribute .