research/brotlidump.py
def explanation(self, index, extra):
        """
        >>> d = DistanceAlphabet('D', NPOSTFIX=2, NDIRECT=10)
        >>> d[55].explanation(13)
        '11[1101]01-5: [0]+240'
        """
        extraBits = self.extraBits(index)
        extraString = '[{:0{}b}]'.format(extra, extraBits)
        return '{0}: [{1[0]}]{1[1]:+d}'.format(
            self.mnemonic(index, True).replace('x'*(extraBits or 1), extraString),
            self.value(index, extra))
def explanation(self, index, extra):
        """
        >>> d = DistanceAlphabet('D', NPOSTFIX=2, NDIRECT=10)
        >>> d[55].explanation(13)
        '11[1101]01-5: [0]+240'
        """
        extraBits = self.extraBits(index)
        extraString = '[{:0{}b}]'.format(extra, extraBits)
        return '{0}: [{1[0]}]{1[1]:+d}'.format(
            self.mnemonic(index, True).replace('x'*(extraBits or 1), extraString),
            self.value(index, extra))
def explanation ( self , index , extra ) : extraBits = self . extraBits ( index ) extraString = '[{:0{}b}]' . format ( extra , extraBits ) return '{0}: [{1[0]}]{1[1]:+d}' . format ( self . mnemonic ( index , True ) . replace ( 'x' * ( extraBits or 1 ) , extraString ) , self . value ( index , extra ) )
>>> d = DistanceAlphabet('D', NPOSTFIX=2, NDIRECT=10)
        >>> d[55].explanation(13)
        '11[1101]01-5: [0]+240'
>>> d = DistanceAlphabet ( D NPOSTFIX = 2 NDIRECT = 10 ) >>> d [ 55 ] . explanation ( 13 ) 11 [ 1101 ] 01 - 5 : [ 0 ] + 240