mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
Added ZeroDivisionError except clauses.
This commit is contained in:
parent
befa2936d0
commit
7610599756
1 changed files with 3 additions and 0 deletions
|
|
@ -177,10 +177,12 @@ print 'try_stmt' # 'try' ':' suite (except_clause ':' suite)* ['finally' ':' sui
|
|||
try: pass
|
||||
try: 1/0
|
||||
except RuntimeError: pass
|
||||
except ZeroDivisionError: pass
|
||||
try: 1/0
|
||||
except EOFError: pass
|
||||
except TypeError, msg: pass
|
||||
except RuntimeError, msg: pass
|
||||
except ZeroDivisionError, msg: pass
|
||||
except: pass
|
||||
try: pass
|
||||
finally: pass
|
||||
|
|
@ -291,6 +293,7 @@ for i in range(10):
|
|||
try: 1/0
|
||||
except NameError: pass
|
||||
except RuntimeError: pass
|
||||
except ZeroDivisionError: pass
|
||||
except TypeError: pass
|
||||
finally: pass
|
||||
try: pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue