PC locks up with list operations

Roy Smith roy at panix.com
Mon Sep 12 07:40:00 EDT 2011

In article <4e6dc66e$0$29986$c3e8da3$5496439d at news.astraweb.com>,
 Steven D'Aprano <steve+comp.lang.python at pearwood.info> wrote:

> > mylist = [0]*12345678901234
> [...]
> > Apart from "Then don't do that!", is there anything I can do to prevent
> > this sort of thing in the future? Like instruct Python not to request more
> > memory than my PC has?
> For anyone who may care, I can report that ulimit under Linux will help with
> this situation.
> [...]
> Does anyone else think it would be useful for Python's memory manager to
> enforce user-settable limits?

Not me.  You've already discovered that ulimit does exactly what you 
want.  Why would be gained by having Python duplicate this functionality?

More information about the Python-list mailing list