(self)
return pairs
Return sequence of (index, key, value, control_index)
        of totally ordered pairs suitable for urlencoding.

        control_index is the index of the control in self.controls
Return sequence of (index, key, value, control_index)
        of totally ordered pairs suitable for urlencoding.
Return sequence of ( index key value control_index ) of totally ordered pairs suitable for urlencoding .
def _pairs_and_controls(self):
        """Return sequence of (index, key, value, control_index)
        of totally ordered pairs suitable for urlencoding.

        control_index is the index of the control in self.controls
        """
        pairs = []
        for control_index in xrange(len(self.controls)):
            control = self.controls[control_index]
            for ii, key, val in control._totally_ordered_pairs():
                pairs.append((ii, key, val, control_index))

        # stable sort by ONLY first item in tuple
        pairs.sort()

        return pairs
def _pairs_and_controls ( self ) : pairs = [ ] for control_index in xrange ( len ( self . controls ) ) : control = self . controls [ control_index ] for ii , key , val in control . _totally_ordered_pairs ( ) : pairs . append ( ( ii , key , val , control_index ) ) # stable sort by ONLY first item in tuple pairs . sort ( ) return pairs