HDI: find the length of floats, ints?

Jerome Chan eviltofu at rocketmail.com
Sat May 6 11:02:46 EDT 2000


How do I find the byte length of a float, double or an int? Or are all 
standard python float, double, ints, etc are of a fixed format?

x = 1
len(x)

doesn't seem to work.

do I need to use

import struct
x = 0
len(struct.pack('@i',x))



More information about the Python-list mailing list