Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Bingo! doctest sets the __builtins__._ variable, and the last doctest in decimal.py (in lexicographic order) is Decimal.__round__, which ends with >>> round(Decimal('sNaN123'), 0) Decimal('NaN123') This is the value you see in Benjamin's output.
Here is a trivial patch: Index: Lib/test/regrtest.py =================================================================== --- Lib/test/regrtest.py (revision 65283) +++ Lib/test/regrtest.py (working copy) @@ -647,6 +647,8 @@ def cleanup_test_droppings(testname, verbose): import shutil + __builtins__._ = None + # Try to clean up junk commonly left behind. While tests shouldn't leave # any files or directories behind, when a test fails that can be tedious # for it to arrange. The consequences can be especially nasty on Windows, ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3462> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com