def _len_int(obj):
    '''Length of multi-precision int (aka long) in digits.
    '''
    if obj:
        n, i = 1, abs(obj)
        if i > _digitmax:
            # no log(x[, base]) in Python 2.2
            n += int(log(i) * _digitlog)
    else:  # zero
        n = 0
    return n
Length of multi-precision int (aka long) in digits.
    
recipes/Python/546530_Size_of_Python_objects_revised/recipe-546530.py