mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
EOF while parsing should raise EOFError, not SyntaxError.
This commit is contained in:
parent
98256aa518
commit
86d8e63433
1 changed files with 1 additions and 1 deletions
|
@ -192,7 +192,7 @@ err_input(err)
|
|||
err_nomem();
|
||||
break;
|
||||
case E_EOF:
|
||||
err_setstr(SyntaxError, "unexpected EOF");
|
||||
err_setstr(EOFError, "unexpected EOF while parsing");
|
||||
break;
|
||||
default:
|
||||
err_setstr(SystemError, "unknown parsing error");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue