python_etf icon indicating copy to clipboard operation
python_etf copied to clipboard

Explicitly import reduce from functools

Open saatviku opened this issue 4 years ago • 1 comments

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

saatviku avatar Mar 06 '21 06:03 saatviku

Thanks for contributing! Hopefully someone with write access would merge it

parsifal-47 avatar Mar 06 '21 06:03 parsifal-47