From 5dc449ba1924e0ce65efd126b94fc174016d738d Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Wed, 20 Mar 2013 13:19:39 -0400 Subject: [PATCH] MAINT: Changes boolean check for snapshot existence in performance. Small tweak to check for existence of elements using built-in boolean of lists, instead of checking for `len`. --- zipline/finance/performance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipline/finance/performance.py b/zipline/finance/performance.py index b68eb17d..3b2c1cdd 100644 --- a/zipline/finance/performance.py +++ b/zipline/finance/performance.py @@ -215,7 +215,7 @@ class PerformanceTracker(object): new_snapshot.append(event) - if len(new_snapshot) > 0: + if new_snapshot: yield date, new_snapshot def get_portfolio(self):