def filename_match(filename, patterns, default=True):
 if (not patterns):
  return default
 return any((fnmatch(filename, pattern) for pattern in patterns))

def filename_match ( filename , patterns , default = True ) : if ( not patterns ) : return default return any ( ( fnmatch ( filename , pattern ) for pattern in patterns ) )
check if options .