python_etf
python_etf copied to clipboard
Explicitly import reduce from functools
This minor change is intended to make library run error free in Python 3.
Python 3 dropped support for reduce() without using functools.
Reduce() is available in functools in Python2 as well. https://docs.python.org/2/library/functools.html#functools.reduce
"This is the same function as reduce(). It is made available in this module to allow writing code more forward-compatible with Python 3."
Lack of this will throw an error in Python 3 : NameError: name 'reduce' is not defined
Thanks for contributing! Hopefully someone with write access would merge it