diff options
| author | Pablo Galindo <Pablogsal@gmail.com> | 2021-04-16 00:45:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-16 00:45:42 +0100 |
| commit | b5b98bd8f8c72a9068cf149dbc162c8c95d30057 (patch) | |
| tree | d5ad6222ee887077367fe44510f946463a0d89e4 /Parser | |
| parent | b280248be8e648feb82f3f3ed0050e50b238df7b (diff) | |
| download | cpython-git-b5b98bd8f8c72a9068cf149dbc162c8c95d30057.tar.gz | |
bpo-43823: Fix location of one of the errors for invalid dictionary literals (GH-25427)
Diffstat (limited to 'Parser')
| -rw-r--r-- | Parser/parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/parser.c b/Parser/parser.c index 2f7a71a541..e47093e1dc 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -19379,7 +19379,7 @@ invalid_kvpair_rule(Parser *p) ) { D(fprintf(stderr, "%*c+ invalid_kvpair[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression !(':')")); - _res = RAISE_SYNTAX_ERROR ( "':' expected after dictionary key" ); + _res = RAISE_ERROR_KNOWN_LOCATION ( p , PyExc_SyntaxError , a -> lineno , a -> end_col_offset - 1 , "':' expected after dictionary key" ); if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; D(p->level--); |
