Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa01141 commit b954c2cCopy full SHA for b954c2c
1 file changed
Python/errors.c
@@ -180,10 +180,10 @@ err_input(err)
180
case E_OK:
181
break;
182
case E_SYNTAX:
183
- err_setstr(ValueError, "syntax error");
+ err_setstr(SyntaxError, "invalid syntax");
184
185
case E_TOKEN:
186
- err_setstr(ValueError, "illegal token");
+ err_setstr(SyntaxError, "invalid token");
187
188
case E_INTR:
189
err_set(KeyboardInterrupt);
@@ -192,10 +192,10 @@ err_input(err)
192
err_nomem();
193
194
case E_EOF:
195
- err_set(EOFError);
+ err_setstr(SyntaxError, "unexpected EOF");
196
197
default:
198
- err_setstr(SystemError, "unknown input error");
+ err_setstr(SystemError, "unknown parsing error");
199
200
}
201
0 commit comments