[Tutor] Floating Point Craziness

Válas Péter sulinet at postafiok.hu
Mon Jun 13 15:54:56 CEST 2011


2011/6/13 Steven D'Aprano <steve at pearwood.info>

> Okay fine, so "1024" stored as a number only requires 10 bits (binary
>>> digits) to store,
>>>
>>
>> Actually, 11. :-)
>>
>
>
> I see your smiley, but actually more than that.

OK, this was the math, I just told that 10 bits were not enough for 2^10.


>
> And if you're using Python, where everything is an object, it will actually
> be fourteen bytes, or 112 bits:
>
Where is the structure of this object (or Python objects in general)
documented?
Suppose, I would like to turn an object into a bytearray to study its
anatomy. But the converter wants to have an encoding as parameter. How can I
do that?

Péter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110613/2801a179/attachment.html>


More information about the Tutor mailing list