def __cmp__(self, other):
        """Compare current header to another by qvalues then strings."""
        diff = builtins.cmp(self.qvalue, other.qvalue)
        if diff == 0:
            diff = builtins.cmp(str(self), str(other))
        return diff
Compare current header to another by qvalues then strings.
cherrypy/lib/httputil.py