[reply #107594 by M. Loewis]
Q: Has anyone looked at making Python 64-bit clean?
I believe the interpreter itself is 64-bit clean; the Alpha port has been working for a long time.
Q: I was looking at trying to use the new mmap module to map in a large (>2G) file, and the comments in the source note that the mmap regions are limited to int-size (31 bits), primarily because Python objects are also limited to this size.
I don't think this is the case. Yes, Python objects are limited to int-size - whether or not this means 31 bits depends on your 64-bit platform. It appears that you have a specific 64-bit platform in mind, where sizeof(int) is 4.
Q: Does anyone know if there's an inherent reason why it would be impossible or difficult to make Python 64-bit clean (say as a compilation option)?
I would not make it a compilation option. I think the best approach would be to use size_t as the object size; that may potentially cause problems in case people want to put negative numbers into the size. Because of this problem, it might be appropriate to write a PEP.
Notice that this change does not make it "64-bit clean" - there still might be other problems that nobody has noticed so far.
[reply #107599 by F. Lundh]
Q: Has anyone looked at making Python 64-bit clean?
It is 64-bit clean, and has been so for many years.
Q: I was looking at trying to use the new mmap module to map in a large (>2G) file, and the comments in the source note that the mmap regions are limited to int-size (31 bits), primarily because Python objects are also limited to this size.
Python *integer* objects are limited to that size on platforms where a C long is 32 bits.
Python runs perfectly fine on tru64, Itanium, and other 64-bit platforms. On most of them, Python ints hold 64-bit values.