summaryrefslogtreecommitdiffstats
path: root/Lib/decimal.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-26 20:37:44 (GMT)
committerGuido van Rossum <guido@python.org>2006-08-26 20:37:44 (GMT)
commit6a2a2a08329567ea41f4f073cb43e487f83872c7 (patch)
tree63fffe60ff821be1660fe50ae7b5a06fac5936e8 /Lib/decimal.py
parent59baa759e4cc4ab66f240f35e3cb7edfb4375952 (diff)
downloadcpython-6a2a2a08329567ea41f4f073cb43e487f83872c7.zip
cpython-6a2a2a08329567ea41f4f073cb43e487f83872c7.tar.gz
cpython-6a2a2a08329567ea41f4f073cb43e487f83872c7.tar.bz2
Inspired by SF patch #860326, make the exception formatting by
traceback.py be closer to the built-in formatting. A few unittests had to be fixed, too.
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r--Lib/decimal.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py
index a8fde82..99c0de6 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -85,7 +85,7 @@ Traceback (most recent call last):
...
...
...
-DivisionByZero: x / 0
+decimal.DivisionByZero: x / 0
>>> c = Context()
>>> c.traps[InvalidOperation] = 0
>>> print c.flags[InvalidOperation]
@@ -103,7 +103,7 @@ Traceback (most recent call last):
...
...
...
-InvalidOperation: 0 / 0
+decimal.InvalidOperation: 0 / 0
>>> print c.flags[InvalidOperation]
1
>>> c.flags[InvalidOperation] = 0