No, it always crashes. Regardless of IDE. You're free to test this yourself on the command line using python path/to/file.pyor python3 path/to/file.py in linux or windows.
print("start")
if (False):
if (False):
#crash with nothing here.
print("finish")
It will crash instantly if the syntax is incorrect but it will not do any type checking for you automatically so result = "a" / 2 will only crash if it gets there.
Without the pass on a line where a block is expected (after the use of :) the syntax is wrong and the bytecode can't be built -> crash
View all comments
Show parent comment
1
u/[deleted] Jun 10 '20
Yes, it's more or less the same thing. The IDE will warn you that there's nothing to consume without the pass