def wildcards_overlap(name1, name2):
 if ((not name1) and (not name2)):
  return True
 if ((not name1) or (not name2)):
  return False
 for (matched1, matched2) in _character_matches(name1, name2):
  if wildcards_overlap(name1[matched1:], name2[matched2:]):
   return True
 return False

def wildcards_overlap ( name1 , name2 ) : if ( ( not name1 ) and ( not name2 ) ) : return True if ( ( not name1 ) or ( not name2 ) ) : return False for ( matched1 , matched2 ) in _character_matches ( name1 , name2 ) : if wildcards_overlap ( name1 [ matched1 : ] , name2 [ matched2 : ] ) : return True return False
return true if two wildcard patterns can match the same string .