]> granicus.if.org Git - python/commit
Raise MemoryError instead of InvalidOperation/MallocError for compatibility
authorStefan Krah <skrah@bytereef.org>
Sun, 25 Mar 2012 16:59:21 +0000 (18:59 +0200)
committerStefan Krah <skrah@bytereef.org>
Sun, 25 Mar 2012 16:59:21 +0000 (18:59 +0200)
commitfe17b2bc77851be1724f9ce2ea07112a06f413ab
treeb9d680161ce00c04d494062d66410f321d3f83cb
parent1d5617958fa4e3e1039c62cbe15565e642a9e428
Raise MemoryError instead of InvalidOperation/MallocError for compatibility
with decimal.py. The standard specifies InsufficientStorage (MallocError) as
a sub-condition of InvalidOperation. This allows a calculation to continue
with NaN results when allocation fails.
Lib/test/test_decimal.py
Modules/_decimal/_decimal.c