mirror of
https://github.com/python/cpython.git
synced 2025-09-13 20:27:05 +00:00
parent
eed30d830b
commit
42b5bcf048
2 changed files with 4 additions and 2 deletions
|
@ -293,6 +293,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #5918: Fix a crash in the parser module.
|
||||||
|
|
||||||
- Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr.
|
- Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr.
|
||||||
|
|
||||||
- Issue #6022: a test file was created in the current working directory by
|
- Issue #6022: a test file was created in the current working directory by
|
||||||
|
|
|
@ -2092,14 +2092,14 @@ validate_try(node *tree)
|
||||||
return (res);
|
return (res);
|
||||||
}
|
}
|
||||||
/* try/except statement: skip past except_clause sections */
|
/* try/except statement: skip past except_clause sections */
|
||||||
while (res && (TYPE(CHILD(tree, pos)) == except_clause)) {
|
while (res && pos < nch && (TYPE(CHILD(tree, pos)) == except_clause)) {
|
||||||
res = (validate_except_clause(CHILD(tree, pos))
|
res = (validate_except_clause(CHILD(tree, pos))
|
||||||
&& validate_colon(CHILD(tree, pos + 1))
|
&& validate_colon(CHILD(tree, pos + 1))
|
||||||
&& validate_suite(CHILD(tree, pos + 2)));
|
&& validate_suite(CHILD(tree, pos + 2)));
|
||||||
pos += 3;
|
pos += 3;
|
||||||
}
|
}
|
||||||
/* skip else clause */
|
/* skip else clause */
|
||||||
if (res && (TYPE(CHILD(tree, pos)) == NAME) &&
|
if (res && pos < nch && (TYPE(CHILD(tree, pos)) == NAME) &&
|
||||||
(strcmp(STR(CHILD(tree, pos)), "else") == 0)) {
|
(strcmp(STR(CHILD(tree, pos)), "else") == 0)) {
|
||||||
res = (validate_colon(CHILD(tree, pos + 1))
|
res = (validate_colon(CHILD(tree, pos + 1))
|
||||||
&& validate_suite(CHILD(tree, pos + 2)));
|
&& validate_suite(CHILD(tree, pos + 2)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue