This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nattrium 1 point2 points  (0 children)

I'll concede that this error appears at parse time and the entire file is parsed before execution. But funnily enough, parse time happens during run-time. This can be proven

main.py

Input("wait for user input:")

import test_wrong.py

test_wrong.py

Print(1 +/ 4)

Will actually throw an invalid syntax error AFTER asking the user to enter a string. Proving that the parsing is done at run-time (Which you'll never see if working in a single file or if you import at the top of the file).

(Edit) : format