Guido van Rossum wrote: > On Fri, Jan 20, 2012 at 11:51 AM, Donald Stufft <donald.stufft at gmail.com>wrote: > >> On Friday, January 20, 2012 at 2:36 PM, Tres Seaver wrote: >> >> On 01/20/2012 02:04 PM, Donald Stufft wrote: >> >> Even if a MemoryException is raised I believe that is still a >> fundamental change in the documented contract of dictionary API. >> >> How so? Dictionary inserts can *already* raise that error. >> >> Because it's raising it for a fundamentally different thing. "You have >> plenty of memory, but we decided to add an arbitrary limit that has nothing >> to do with memory and pretend you are out of memory anyways". >> > > Actually due to fragmentation that can already happen. Whether you have run out of total memory, or a single contiguous block, it is still a memory error. An arbitrary limit on collisions is not a memory error. If we were designing this API from scratch, would anyone propose using MemoryError for "you have reached a limit on collisions"? It has nothing to do with memory. Using MemoryError for something which isn't a memory error is ugly. How about RuntimeError? -- Steven
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