Re: struct,long on 64-bit machine

2007-11-19 Thread Hrvoje Niksic
Neal Becker <[EMAIL PROTECTED]> writes: > What's wrong with this? > type(struct.unpack('l','\00'*8)[0]) > > > Why I am getting 'int' when I asked for 'long'? C longs are converted to Python integers; see the table on http://docs.python.org/lib/module-struct.html. If you really need the Python l

Re: struct,long on 64-bit machine

2007-11-19 Thread Robin Becker
Neal Becker wrote: > What's wrong with this? > type(struct.unpack('l','\00'*8)[0]) > > > 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 Be

struct,long on 64-bit machine

2007-11-19 Thread Neal Becker
What's wrong with this? type(struct.unpack('l','\00'*8)[0]) Why I am getting 'int' when I asked for 'long'? This is on python-2.5.1-15.fc8.x86_64 -- http://mail.python.org/mailman/listinfo/python-list