On 07:09 pm, facundobatista at gmail.com wrote: >On Wed, Oct 27, 2010 at 12:05 PM, Benjamin Peterson ><benjamin at python.org> wrote: >>Isn't this usually when you do something like [None]*2**300? In that >>case, wouldn't you know how much memory you're requesting? > >It could happen on any malloc. It depends on how much you have free. > >Don't think on getting a MemoryError on a python you just opened in >the console. Think about a server with a month of uptime, where you >have all the memory fragmented, etc. >>Also, why is that useful? > >It helps to determine why we're having some Memory Errors on our >long-lived server, how is the behaviour when that happens, etc. But... If you allocated all of your memory to some garbage, and then a 5 byte string can't be allocated, you don't really care about the 5 byte string, you care about the garbage that's wasting your memory. Tools like heapy will give you a lot of information. Maybe it wouldn't hurt anyone to have more information in a MemoryError. But I don't think it's going to help a lot either. It's not the information that you're really interested in. Jean-Paul
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4