summaryrefslogtreecommitdiffstats
path: root/Grammar
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-04-10 03:55:56 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-04-10 03:55:56 (GMT)
commitd51374ed78a3e3145911a16cdf3b9b84b3ba7d15 (patch)
tree31f9086f20f5b8923604f41f1a4d139fa809aaed /Grammar
parent2aad6ef77419887f5875ba942e9369b4bdd34a5e (diff)
downloadcpython-d51374ed78a3e3145911a16cdf3b9b84b3ba7d15.zip
cpython-d51374ed78a3e3145911a16cdf3b9b84b3ba7d15.tar.gz
cpython-d51374ed78a3e3145911a16cdf3b9b84b3ba7d15.tar.bz2
PEP 465: a dedicated infix operator for matrix multiplication (closes #21176)
Diffstat (limited to 'Grammar')
-rw-r--r--Grammar/Grammar4
1 files changed, 2 insertions, 2 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar
index d7aaffd..354fe60 100644
--- a/Grammar/Grammar
+++ b/Grammar/Grammar
@@ -40,7 +40,7 @@ small_stmt: (expr_stmt | del_stmt | pass_stmt | flow_stmt |
expr_stmt: testlist_star_expr (augassign (yield_expr|testlist) |
('=' (yield_expr|testlist_star_expr))*)
testlist_star_expr: (test|star_expr) (',' (test|star_expr))* [',']
-augassign: ('+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^=' |
+augassign: ('+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^=' |
'<<=' | '>>=' | '**=' | '//=')
# For normal assignments, additional restrictions enforced by the interpreter
del_stmt: 'del' exprlist
@@ -97,7 +97,7 @@ xor_expr: and_expr ('^' and_expr)*
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]
atom: ('(' [yield_expr|testlist_comp] ')' |