(self, a, b)
return changes
assumes a and b are of the same length.
assumes a and b are of the same length.
assumes a and b are of the same length .
def byte_diff_count (self, a, b):
        """
        assumes a and b are of the same length.
        """
        
        max_len = max(len(a), len(b))
        min_len = min(len(a), len(b))
        changes = max_len - min_len

        for idx in xrange(min_len):
            if a[idx] != b[idx]:
                changes += 1

        return changes
def byte_diff_count ( self , a , b ) : max_len = max ( len ( a ) , len ( b ) ) min_len = min ( len ( a ) , len ( b ) ) changes = max_len - min_len for idx in xrange ( min_len ) : if a [ idx ] != b [ idx ] : changes += 1 return changes