Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobierenF&A Diskussionen
REDUNDANT
1 Stimme
9 Antworten3 hearts not enuf
4 Stimmen
2 AntwortenIf 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 Stimmen
2 AntwortenHeute heiß
How to cast in python : 2
2 Votes
Polyalphabetic Cipher
0 Votes
Why didn't I get it?
1 Votes
Adding a photo
1 Votes
Access deny problem
1 Votes
Help
0 Votes
BOTSS
0 Votes
C++20 module Cmake Source Code
1 Votes