1 Jun
2021
1 Jun
'21
1:10 p.m.
Python has support for conditional statement, list comprehensions, dict comprehensions, etc. So we can write these in mere one or two lines. But for try-except it's not possible to write it one or two lines. Many a times, we have one stmt that we want to check and if it raises error then do nothing or just execute one stmt. This idea proposes to add a way to write try-except for one stmt in one line. Thanking you, With Regards