summaryrefslogtreecommitdiff
path: root/Python/ast.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2014-11-23 15:56:41 +0100
committerAntoine Pitrou <solipsis@pitrou.net>2014-11-23 15:56:41 +0100
commit7b53f4ba313ddc97503a1b20a32c7ece98e6f14f (patch)
treed4a1ae925557271361d6681d52110a9baab414f8 /Python/ast.c
parent45d2905e417a1edcec07d77bb7a2b5e16a6d7a85 (diff)
parent86a6e9bbd9773fe387dae31f7ca24ccfcdc7ded1 (diff)
downloadcpython-7b53f4ba313ddc97503a1b20a32c7ece98e6f14f.tar.gz
Issue #22894: TestCase.subTest() would cause the test suite to be stopped when in failfast mode, even in the absence of failures.
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 5668755346..d6bddf1192 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -825,6 +825,8 @@ get_operator(const node *n)
return Sub;
case STAR:
return Mult;
+ case AT:
+ return MatMult;
case SLASH:
return Div;
case DOUBLESLASH:
@@ -1030,6 +1032,8 @@ ast_for_augassign(struct compiling *c, const node *n)
return Pow;
else
return Mult;
+ case '@':
+ return MatMult;
default:
PyErr_Format(PyExc_SystemError, "invalid augassign: %s", STR(n));
return (operator_ty)0;
@@ -2266,7 +2270,7 @@ ast_for_expr(struct compiling *c, const node *n)
and_expr: shift_expr ('&' shift_expr)*
shift_expr: arith_expr (('<<'|'>>') arith_expr)*
arith_expr: term (('+'|'-') term)*
- term: factor (('*'|'/'|'%'|'//') factor)*
+ term: factor (('*'|'@'|'/'|'%'|'//') factor)*
factor: ('+'|'-'|'~') factor | power
power: atom trailer* ('**' factor)*
*/
@@ -2577,7 +2581,7 @@ ast_for_expr_stmt(struct compiling *c, const node *n)
/* expr_stmt: testlist_star_expr (augassign (yield_expr|testlist)
| ('=' (yield_expr|testlist))*)
testlist_star_expr: (test|star_expr) (',' test|star_expr)* [',']
- augassign: '+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^='
+ augassign: '+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^='
| '<<=' | '>>=' | '**=' | '//='
test: ... here starts the operator precendence dance
*/