diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-09-14 21:18:31 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-09-14 21:18:31 +0300 |
commit | c1d9bb342c40ba1e7b0cf69214726d269f1d74db (patch) | |
tree | f971494fc467034d9f7ac082fc9930d76dde5764 /Python/ast.c | |
parent | 8664b17c9457da72299bf05ca734b02c6cea00f1 (diff) | |
parent | b0e630183e0663e0651c5d8fe54a15fb46699d0c (diff) | |
download | cpython-c1d9bb342c40ba1e7b0cf69214726d269f1d74db.tar.gz |
Issue #22384: An exception in Tkinter callback no longer crashes the program
when it is run with pythonw.exe.
Documented that Tk.report_callback_exception() is purposed to be overriden in
applications.
Diffstat (limited to 'Python/ast.c')
-rw-r--r-- | Python/ast.c | 8 |
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 */ |