Commit 0ba77ca3 authored by Stefan Behnel's avatar Stefan Behnel

adapt reduce() to Py2/Py3 changes

parent b9d85467
...@@ -7,6 +7,11 @@ from __future__ import absolute_import ...@@ -7,6 +7,11 @@ from __future__ import absolute_import
import copy import copy
import re import re
try:
reduce
except NameError:
from functools import reduce
from .Code import UtilityCode, LazyUtilityCode, TempitaUtilityCode from .Code import UtilityCode, LazyUtilityCode, TempitaUtilityCode
from . import StringEncoding from . import StringEncoding
from . import Naming from . import Naming
......
...@@ -9,6 +9,11 @@ from .. import Utils ...@@ -9,6 +9,11 @@ from .. import Utils
from .PyrexTypes import py_object_type, unspecified_type from .PyrexTypes import py_object_type, unspecified_type
from .Visitor import CythonTransform, EnvTransform from .Visitor import CythonTransform, EnvTransform
try:
reduce
except NameError:
from functools import reduce
class TypedExprNode(ExprNodes.ExprNode): class TypedExprNode(ExprNodes.ExprNode):
# Used for declaring assignments of a specified type without a known entry. # Used for declaring assignments of a specified type without a known entry.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment