Python-list Digest, Vol 67, Issue 192

Chris Rebert clp2 at
Mon Apr 13 00:45:07 CEST 2009

On Sun, Apr 12, 2009 at 3:38 PM, Ryniek90 <ryniek90 at> wrote:
>> Paul Rubin <>
>> Ryniek90 <ryniek90 at> writes:
>>> When i wanted to send an .iso file of 4GB length, i had traceback:
>>> "OverflowError: requested number of bytes is more than a Python string
>>> can hold"
>> You're not supposed to put the 4GB all in one string.  Open the
>> socket and send smaller packets through it.
>>  ------------------------------------------------------------------------
> Ok, so i will split that data for smaller files. But i've still haven't got
> answer for question: "What's the max. length of string bytes which Python
> can hold?

    The largest positive integer supported by the platform’s
Py_ssize_t type, and thus the maximum size lists, strings, dicts, and
many other containers can have.


I have a blog:

More information about the Python-list mailing list