コード例 #1
0
ファイル: floatobject.py プロジェクト: pombreda/flypy
def float_format(x):
    """
    Format an integer:

        - upcast to a double
        - use snprintf
        - resize buffer according to # of bytes written
    """
    return formatting.format_static("%f", upcast(x), 20)
コード例 #2
0
 def __str__(self):
     # maxlen = int(math.log10(2**64)) + 1 = 20 in a 64-bit address space
     return formatting.format_static("%p", self, 20 + 1)
コード例 #3
0
ファイル: pointerobject.py プロジェクト: flypy/flypy
 def __str__(self):
     # maxlen = int(math.log10(2**64)) + 1 = 20 in a 64-bit address space
     return formatting.format_static("%p", self, 20 + 1)