(baselen, deltas)
return bytes(result)
3.4 Bias adaptation
3.4 Bias adaptation
3 . 4 Bias adaptation
def generate_integers(baselen, deltas):
    """3.4 Bias adaptation"""
    # Punycode parameters: initial bias = 72, damp = 700, skew = 38
    result = bytearray()
    bias = 72
    for points, delta in enumerate(deltas):
        s = generate_generalized_integer(delta, bias)
        result.extend(s)
        bias = adapt(delta, points==0, baselen+points+1)
    return bytes(result)
def generate_integers ( baselen , deltas ) : # Punycode parameters: initial bias = 72, damp = 700, skew = 38 result = bytearray ( ) bias = 72 for points , delta in enumerate ( deltas ) : s = generate_generalized_integer ( delta , bias ) result . extend ( s ) bias = adapt ( delta , points == 0 , baselen + points + 1 ) return bytes ( result )