Can Syntax Errors be handled?
SyntaxError is a perfectly ordinary built-in exception. It is not special in any way. Only the circumstances of when it’s (usually) thrown are a bit unusual. A syntax error means that the code featuring said error cannot be parsed. It doesn’t even begin to be a valid program, hence it cannot be executed. Therefore SyntaxError … Read more