A syntax error will halt parsing immediately. Without successfully parsing the file, it won't execute. Even uncalled functions are parsed completely and must pass parsing successfully.
I don't understand why you consider that to be a "serious error", rather than some other category of error. Why is that more serious than, say, trying to add a string and a dictionary? Or trying to call a list?
What are you talking about? The Python interpreter will not just silently accept syntax errors in the same file. Python is compiled to byte code before it is executed, and for this step to work, the code must be syntactically correct.
I quite like python, but in order to use it for any serious project, it's best to self impose many more rules than the interpreter enforces. Once you have mypy and ruff or some other linter hooked up, you start to get enough protections that languages like c or c++ build into the compiler that it becomes less of an issue.
Generally because of the field, for example I build a lot of geospatial applications for work and for geospatial libraries python is far ahead of any other language same goes for machine learning / AI (though for NLP a lot of languages have caught up).
Coming from C# looks kinda messy and some syntax seems unnecessarily shortened (i have trauma from a brief stint with COBOL), But i appreciate that it's still more readable than javascript, it has some kinda cool wizardish style.
i also love it has a proper indentation convention and syntax after the horrors i have witnessed with VB (rest in piss, you will not be missed).
Coming from c# i have no issues with the warning nagging, it's even worse there and my colleagues attitude is "if it compiles, it's ok"
50
u/deceze Sep 06 '26
The Python interpreter does not overlook syntax errors within the same file…!?
32
u/NFriik Sep 06 '26
What are you talking about? The Python interpreter will not just silently accept syntax errors in the same file. Python is compiled to byte code before it is executed, and for this step to work, the code must be syntactically correct.
8
u/Sibula97 Sep 06 '26
If it works, it's not a type error.
Python has strict (but dynamic) typing, and it will give you a TypeError if the function doesn't expect the type(s) you're giving it.
What you're probably thinking of are the occasional unintuitive operator overloads like + for appending to lists of whatever.
3
u/[deleted] Sep 07 '26
2
u/FerricDonkey Sep 06 '26
I quite like python, but in order to use it for any serious project, it's best to self impose many more rules than the interpreter enforces. Once you have mypy and ruff or some other linter hooked up, you start to get enough protections that languages like c or c++ build into the compiler that it becomes less of an issue.
1
u/Sea-Fishing4699 Sep 06 '26
lgtm i'll run it and find out later!
1
u/mad_poet_navarth Sep 06 '26
I _like_ python but yeah, it's a problem.
1
u/oompaloompa465 Sep 06 '26
i've started recently with the language.
Coming from C# looks kinda messy and some syntax seems unnecessarily shortened (i have trauma from a brief stint with COBOL), But i appreciate that it's still more readable than javascript, it has some kinda cool wizardish style.
i also love it has a proper indentation convention and syntax after the horrors i have witnessed with VB (rest in piss, you will not be missed).
Coming from c# i have no issues with the warning nagging, it's even worse there and my colleagues attitude is "if it compiles, it's ok"
3
u/Percolator2020 Sep 06 '26
Linter: fuck you, fuck you, oh wait that’s ok, never mind! Fuck you!