summaryrefslogtreecommitdiff
path: root/Python/ast.c
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2015-01-23 19:36:54 +0000
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2015-01-23 19:36:54 +0000
commit8fa7954e4ef26dcf377019236cc2171fb8be8355 (patch)
treea1e6fd2f3384fb9656a70174a65ea0a04ffd4861 /Python/ast.c
parenta2f7d2bf741a71f23cbf154cc292e610086f431f (diff)
parentc8962fe46dc4b0bfa761087a8e095e0fb001fb34 (diff)
downloadcpython-8fa7954e4ef26dcf377019236cc2171fb8be8355.tar.gz
Closes #23202: pyvenv documentation updated to match its behavior.
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
*/