summaryrefslogtreecommitdiff
path: root/Lib/test/test_exceptions.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2006-03-01 04:25:17 +0000
committerBrett Cannon <bcannon@gmail.com>2006-03-01 04:25:17 +0000
commita99c1d8d881c21f9ec22d6839ade0dc1c9a6af36 (patch)
tree79cefe64e3c0ac37bdfb44d1b7088fffdf56b418 /Lib/test/test_exceptions.py
parent53ff69ff36d053fa4bdcf6320cee392b06c7750e (diff)
downloadcpython-a99c1d8d881c21f9ec22d6839ade0dc1c9a6af36.tar.gz
PEP 352 implementation. Creates a new base class, BaseException, which has an
added message attribute compared to the previous version of Exception. It is also a new-style class, making all exceptions now new-style. KeyboardInterrupt and SystemExit inherit from BaseException directly. String exceptions now raise DeprecationWarning. Applies patch 1104669, and closes bugs 1012952 and 518846.
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r--Lib/test/test_exceptions.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index c157122b5b..fdef876879 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -29,10 +29,7 @@ def test_raise_catch(exc):
def r(thing):
test_raise_catch(thing)
- if isinstance(thing, ClassType):
- print thing.__name__
- else:
- print thing
+ print getattr(thing, '__name__', thing)
r(AttributeError)
import sys