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

def _all_the_same_submit ( matches ) : name = None value = None for match in matches : if ( match . type not in [ 'submit' , 'hidden' ] ) : return False if ( name is None ) : name = match . name value = match . value elif ( ( match . name != name ) or ( match . value != value ) ) : return False return True
utility function to check to see if a list of controls all really belong to the same control: for use with checkboxes .