homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: decimal.Decimal( 0 ).sqrt() fails
Type: crash Stage:
Components: Library (Lib) Versions: Python 3.0, Python 2.6, Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: facundobatista, glathoud, mark.dickinson, rhettinger
Priority: normal Keywords:

Created on 2008年03月25日 10:13 by glathoud, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Messages (4)
msg64471 - (view) Author: (glathoud) Date: 2008年03月25日 10:14
I got a crash with Python 2.5.2 :
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import decimal
>>> decimal.Decimal( 0 ).sqrt()
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "f:\Python25\lib\decimal.py", line 2330, in sqrt
 return ans._fix(context)
 File "f:\Python25\lib\decimal.py", line 1461, in _fix
 Etiny = context.Etiny()
AttributeError: 'NoneType' object has no attribute 'Etiny'
msg64480 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008年03月25日 13:30
I'll fix this.
msg64485 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008年03月25日 14:40
Fixed in r61892 (2.6) and r61893 (2.5). Thanks for the report!
This bug exposes a flaw in the decimal testsuite: the thousands of 
testcases in Lib/test/decimaltestdata are only ever run with an explicitly 
given context. Would it be worth having an option to run (almost all) 
these tests with an implicit context as well, or even to
do this by default in addition to the explicit context testing?
msg64491 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2008年03月25日 15:55
It'd be nice to have it, but actually I'm not sure that this is doable
without some heavy editing of decimal's test framework.
Thanks!
History
Date User Action Args
2022年04月11日 14:56:32adminsetgithub: 46730
2008年03月25日 15:55:05facundobatistasetnosy: + facundobatista
messages: + msg64491
2008年03月25日 14:40:07mark.dickinsonsetstatus: open -> closed
resolution: fixed
messages: + msg64485
2008年03月25日 14:02:32mark.dickinsonsetversions: + Python 2.6, Python 3.0
2008年03月25日 13:30:34mark.dickinsonsetnosy: + mark.dickinson
messages: + msg64480
2008年03月25日 12:34:44georg.brandlsetassignee: rhettinger
nosy: + rhettinger
2008年03月25日 10:14:50glathoudsetmessages: + msg64471
2008年03月25日 10:13:48glathoudcreate

AltStyle によって変換されたページ (->オリジナル) /