[Mesa-dev] [PATCH 3.5/7] report.py: Don't use 'len(x) > 0' to check list emptiness
Ian Romanick
idr at freedesktop.org
Thu Jan 18 22:41:17 UTC 2018
From: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Suggested-by: Dylan Baker <baker.dylan.c at gmail.com>
---
report.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/report.py b/report.py
index 003a1ee..185b585 100755
--- a/report.py
+++ b/report.py
@@ -110,7 +110,7 @@ def main():
namestr = p[0] + " " + p[1]
print(m + " helped: " + get_result_string(
namestr, args.before[p][m], args.after[p][m]))
- if len(helped) > 0:
+ if helped:
print("")
hurt.sort(
@@ -119,7 +119,7 @@ def main():
namestr = p[0] + " " + p[1]
print(m + " HURT: " + get_result_string(
namestr, args.before[p][m], args.after[p][m]))
- if len(hurt) > 0:
+ if hurt:
print("")
num_helped[m] = len(helped)
@@ -140,13 +140,13 @@ def main():
lost.sort()
for p in lost:
print("LOST: " + p)
- if len(lost) > 0:
+ if lost:
print("")
gained.sort()
for p in gained:
print("GAINED: " + p)
- if len(gained) > 0:
+ if gained:
print("")
for m in args.measurements:
--
2.9.5
More information about the mesa-dev
mailing list