diff options
| author | Guido van Rossum <guido@python.org> | 1998-03-26 22:14:20 (GMT) |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1998-03-26 22:14:20 (GMT) |
| commit | 548703a1b81f6adf68a3dd4b497a88f5c4a31f4a (patch) | |
| tree | 8fc46e5faa2a7e82e6748995c555d7fe0b781449 /Lib/dos-8x3/test_exc.py | |
| parent | 65e5399081e23d7b1efbf685096c65d0a0ab912b (diff) | |
| download | cpython-548703a1b81f6adf68a3dd4b497a88f5c4a31f4a.zip cpython-548703a1b81f6adf68a3dd4b497a88f5c4a31f4a.tar.gz cpython-548703a1b81f6adf68a3dd4b497a88f5c4a31f4a.tar.bz2 | |
The usual.
Diffstat (limited to 'Lib/dos-8x3/test_exc.py')
| -rwxr-xr-x | Lib/dos-8x3/test_exc.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Lib/dos-8x3/test_exc.py b/Lib/dos-8x3/test_exc.py index dbcdbe8..9796ef4 100755 --- a/Lib/dos-8x3/test_exc.py +++ b/Lib/dos-8x3/test_exc.py @@ -8,9 +8,9 @@ print '5. Built-in exceptions' def r(thing): if type(thing) == ClassType: - print thing.__name__ + print thing.__name__ else: - print thing + print thing r(AttributeError) import sys @@ -24,14 +24,14 @@ fp.close() fp = open(TESTFN, 'r') savestdin = sys.stdin try: - try: - sys.stdin = fp - x = raw_input() - except EOFError: - pass + try: + sys.stdin = fp + x = raw_input() + except EOFError: + pass finally: - sys.stdin = savestdin - fp.close() + sys.stdin = savestdin + fp.close() r(IOError) try: open('this file does not exist', 'r') @@ -64,7 +64,7 @@ except NameError: pass r(OverflowError) x = 1 try: - while 1: x = x+x + while 1: x = x+x except OverflowError: pass r(RuntimeError) |
