3 ms·
> However, Python doesn’t have the compile-time check Yes it does. All Python source code is parsed and compiled into bytecode. SyntaxError is raised before ru
by kissgyorgy 3y ago
> However, Python doesn’t have the compile-time check
Yes it does. All Python source code is parsed and compiled into bytecode. SyntaxError is raised before runtime.
- gpderetta 3y agoI think the author is obviously talking about compile time type checks here.
- maweki 3y agoIt's arguable whether a SyntaxError happens as a compile-time check. It's true that it is raised before runtime. But a document that can be parsed according to the syntax definition is a necessary precondition to all checks of any static program property. Syntactic correctness in itself is not a static property of a program. A program is, by definition, syntactically correct. Without a correct syntax there is no way to assign meaning or execute or interpret, etc.