@@ -0,0 +1,873 @@
+%22%22%22Module that defines a wrapper object which logs comparisons.%22%22%22%0A%0Aclass ComparisonLoggingWrapper(object):%0A    %22%22%22A wrapper for values which logs comparison operations%22%22%22%0A%0A    def __init__(self, value, log):%0A        %22%22%22Wrap the value using the log object.%22%22%22%0A        self.value = value%0A        self.log = log%0A%0A    def __cmp__(self, other):%0A        %22%22%22Compare and log.%22%22%22%0A        log.info(%22Called comparison on wrapped value: %25s%22, self.value)%0A        try:%0A            other_value = other.value%0A            wrapped = True%0A        except AttributeError:%0A            other_value = other%0A            wrapped = False%0A        if wrapped:%0A            log.info(%22against wrapped value: %25s%22, other_value)%0A        else:%0A            log.info(%22against bare value: %25s%22, other_value)%0A        result = self.__cmp__(other_value)%0A        log.info(%22result: %25s%22, result)%0A        return result%0A

Create comparison_logging_wrapper.py