diff options
author | Georg Brandl <georg@python.org> | 2006-05-30 07:34:45 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-05-30 07:34:45 (GMT) |
commit | 861089fc49e17bc3d192e01f19641d9e01e0fa03 (patch) | |
tree | d0290b45b73c8110d7978a99ffc0d258fb14fb31 /Lib | |
parent | 008b861bf03f515b19ced29b1138a7c9fc910d82 (diff) | |
download | cpython-861089fc49e17bc3d192e01f19641d9e01e0fa03.zip cpython-861089fc49e17bc3d192e01f19641d9e01e0fa03.tar.gz cpython-861089fc49e17bc3d192e01f19641d9e01e0fa03.tar.bz2 |
Disallow keyword args for exceptions.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_exceptions.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index b4a766e..20e76b9 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -296,3 +296,10 @@ for args in exceptionList: ( repr(e), checkArgName, repr(expected[checkArgName]), repr(getattr(e, checkArgName)) )) + +try: + BaseException(a=1) +except TypeErrror: + pass +else: + raise TestFailed("BaseException shouldn't take keyword args") |