diff options
author | Guido van Rossum <guido@python.org> | 1991-12-26 13:06:39 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1991-12-26 13:06:39 (GMT) |
commit | ccfd6e105b5a53578ff3ebf99eb7da58a47e2d9a (patch) | |
tree | 0f22168e948f3317a0110370ccc2700533db7a93 /Lib | |
parent | ce08448165249b8be2181f231178db52504e2b01 (diff) | |
download | cpython-ccfd6e105b5a53578ff3ebf99eb7da58a47e2d9a.zip cpython-ccfd6e105b5a53578ff3ebf99eb7da58a47e2d9a.tar.gz cpython-ccfd6e105b5a53578ff3ebf99eb7da58a47e2d9a.tar.bz2 |
New class syntax.
Use ImportERror
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/testall.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Lib/test/testall.py b/Lib/test/testall.py index a385be1..753e066 100644 --- a/Lib/test/testall.py +++ b/Lib/test/testall.py @@ -176,7 +176,6 @@ print 'try_stmt' # 'try' ':' suite (except_clause ':' suite)* ['finally' ':' sui ### except_clause: 'except' [expr [',' expr]] try: pass try: 1/0 -except RuntimeError: pass except ZeroDivisionError: pass try: 1/0 except EOFError: pass @@ -269,11 +268,11 @@ x = 123 print 'classdef' # 'class' NAME parameters ['=' baselist] ':' suite ### baselist: atom arguments (',' atom arguments)* ### arguments: '(' [testlist] ')' -class B(): pass -class C1() = B(): pass -class C2() = B(): pass -class D() = C1(), C2(), B(): pass -class C(): +class B: pass +class C1(B): pass +class C2(B): pass +class D(C1, C2, B): pass +class C: def meth1(self): pass def meth2(self, arg): pass def meth3(self, (a1, a2)): pass @@ -486,12 +485,9 @@ print 'Passed all tests.' try: import mac unlink = mac.unlink -except NameError: - try: - import posix - unlink = posix.unlink - except NameError: - pass +except ImportError: + import posix + unlink = posix.unlink unlink('@test') print 'Unlinked @test' |