how many bytes in an int

"Martin v. Löwis" martin at v.loewis.de
Mon Aug 9 00:40:36 EDT 2004


Reid Nichol wrote:
>   I was wondering if I could control how many bytes are in an int and 
> the byte order.  In C/C++ I can use int32 but how do I do this in 
> python?  How can I control byte order?

You can't. Python uses as many bytes as are necessary to represent
the number (larger numbers - more bytes). Why do you want to control
the number of bytes?

Regards,
Martin



More information about the Python-list mailing list