From c781eba460e45de61ec1cef923323d21ee80e38d Mon Sep 17 00:00:00 2001 From: saatviku Date: Sat, 6 Mar 2021 11:46:27 +0530 Subject: [PATCH] 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." --- erl_terms/erl_terms_core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erl_terms/erl_terms_core.py b/erl_terms/erl_terms_core.py index 4824973..2a42e9d 100644 --- a/erl_terms/erl_terms_core.py +++ b/erl_terms/erl_terms_core.py @@ -1,6 +1,7 @@ import re from parsimonious.grammar import Grammar import parsimonious.exceptions +from functools import reduce class ParseError(Exception): pass