string copying

Steve Holden sholden at holdenweb.com
Sun Mar 31 08:59:44 EST 2002


"Tim Peters" <tim.one at comcast.net> wrote ...
> [Bengt Richter, on consuming vast quantities of memory quickly]
> > s = 'x'*2**30 would be a quick gig too. But it made me think
> > maybe one could write a sort of memory test (to exercise the
> > available python space, anyway).  Does python run out of memory
> > gracefully?
>
> Very.  You should get a clean MemoryError exception if you try.
>
> >>> 'x' * 2**30
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> MemoryError
> >>>
>
My laptop upgrade clearly takes my platform beyond the timbot conceptual
limit: it took about three minutes to start printing (I'm not thinking of
letting it finish) with no error message in sight.

the-point-is-still-valid-though-ly y'rs  - steve







More information about the Python-list mailing list