[Python-ideas] More details in MemoryError

Antoine Pitrou solipsis at pitrou.net
Tue Jan 22 19:27:10 CET 2013


On Wed, 23 Jan 2013 00:04:15 +1100
Chris Angelico <rosuav at gmail.com> wrote:
> On Tue, Jan 22, 2013 at 11:42 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> > Something like this could be used to decide whether or not to flush
> > unimportant in-memory caches, compact data structures, etc., or just
> > give up and exit.
> 
> That's a nice idea, but unless the requested allocation was fairly
> large, there's a good chance you don't have room to allocate anything
> more.

I wouldn't be surprised if most cases of MemoryErrors were on fairly
large allocation requests ;-)

Regards

Antoine.





More information about the Python-ideas mailing list