Fix #1290: Py3.5's @ operator/assertion rewriting.

This commit is contained in:
TomV
2016-02-05 22:30:07 +00:00
parent b5dc7d9be1
commit 7d107018e8
3 changed files with 21 additions and 0 deletions

View File

@@ -453,6 +453,11 @@ binop_map = {
ast.In: "in",
ast.NotIn: "not in"
}
# Python 3.5+ compatibility
try:
binop_map[ast.MatMult] = "@"
except AttributeError:
pass
# Python 3.4+ compatibility
if hasattr(ast, "NameConstant"):