struct,long on 64-bit machine

Robin Becker robin at reportlab.com
Mon Nov 19 07:42:38 EST 2007


Neal Becker wrote:
> What's wrong with this?
> type(struct.unpack('l','\00'*8)[0])
> <type 'int'>
> 
> Why I am getting 'int' when I asked for 'long'?
> 
> This is on python-2.5.1-15.fc8.x86_64
> 
On my AMD 64 I think int is 64 bits


$ python -c "import sys; print sys.maxint"
9223372036854775807

-- 
Robin Becker




More information about the Python-list mailing list