def _all_the_same_checkbox(matches):
 name = None
 for match in matches:
  if (match.type not in ['checkbox', 'hidden']):
   return False
  if (name is None):
   name = match.name
  elif (match.name != name):
   return False
 return True

def _all_the_same_checkbox ( matches ) : name = None for match in matches : if ( match . type not in [ 'checkbox' , 'hidden' ] ) : return False if ( name is None ) : name = match . name elif ( match . name != name ) : return False return True
check whether all these controls are actually the the same checkbox .