[PATCH] D67817: [LNT] Python 3 support: adapt to map returning an iterator

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 06:07:49 PDT 2019


thopre added inline comments.


================
Comment at: lnt/external/stats/stats.py:1569
     alldata = []
-    tmp = map(N.array,lists)
-    means = map(amean,tmp)
-    vars = map(avar,tmp)
-    ns = map(len,lists)
+    tmp = map(N.array, lists)
+    means = list(map(amean, tmp))
----------------
hubert.reinterpretcast wrote:
> `tmp` is consumed twice immediately below, so the `list` application would still be appropriate if we aren't removing this block altogether.
Yes but map accepts an iterable so if the only uses are below (as the name tmp would imply) that change should be fine. I grepped LNT around for vars and means and couldn't find use elsewhere and git history isn't very informative. I've thus decided to remove the entire block.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67817/new/

https://reviews.llvm.org/D67817





More information about the llvm-commits mailing list