Обсуждения
try-except & Boolean
 1 голос
 3 ответовIf except can handle common errors very well, doesn't that make the use of raise redundant inside of a try-except block?
For example:
try:
   print( 5 / 0 )
except ZeroDivisionError:
   raise ValueError("An error occurred!")
What's the difference if we handle it this way:
try:
   print( 5 / 0 )
except (ZeroDivisionError, ValueError):
   print("An error occurred!")
 3 голосов
 2 ответовАктуальное сегодня
Checking personal activity
 0 Votes
Where is the error
 0 Votes
Help
 0 Votes
Full form of HTML
 0 Votes
Please help me
 0 Votes
Use of global function in c
 0 Votes
Which one is better?? And why??
 1 Votes
Game
 0 Votes







