[PATCH] D67810: [LNT] Python 3 support: import reduce from functools

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 20 01:32:30 PDT 2019


thopre created this revision.
thopre added reviewers: cmatthews, hubert.reinterpretcast, kristof.beyls.
thopre added a parent revision: D67809: [LNT] Python 3 support: use Python 3 idioms.

Import reduce from functools since it was removed as a builtin in Python

3. reduce was added to functools in Python 2.6. This was produced by

running futurize's stage1 lib2to3.fixes.fix_reduce.


https://reviews.llvm.org/D67810

Files:
  lnt/util/stats.py


Index: lnt/util/stats.py
===================================================================
--- lnt/util/stats.py
+++ lnt/util/stats.py
@@ -1,6 +1,7 @@
 from __future__ import division
 import math
 from lnt.external.stats.stats import mannwhitneyu as mannwhitneyu_large
+from functools import reduce
 
 
 def safe_min(values):


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67810.220968.patch
Type: text/x-patch
Size: 329 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190920/fb5dbd50/attachment.bin>


More information about the llvm-commits mailing list