reduce is_cxx to a bool instead of a re.MatchObject