[Tutor] a question about maxint
eryksun at gmail.com
Wed Oct 3 21:41:06 CEST 2012
On Wed, Oct 3, 2012 at 2:53 PM, Alan Gauld <alan.gauld at btinternet.com> wrote:
> The only times you really need to worry about maxsize is when interfacing to
> external non-python code.
It's not generally a problem, but if you're on a 32-bit platform, for
which sys.maxsize is 2**31 - 1, that sets the maximum length of a
sequence or string. So, for example, you won't be able to read a 2 GiB
file into one string (or Py3k bytes object). However, if you're on a
64-bit platform, there's nothing to worry about since sys.maxsize is
2**63 - 1.
More information about the Tutor