From 403a8e906463fe4ae5c46fcf2638f21d31472621 Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Fri, 21 Dec 2012 21:46:46 -0500 Subject: [PATCH] Removes assert of sort protocol in inner loop. Since this was invoked as an function, the invocation of the method was not dropped by -O. Also, moving towards only having postconditional asserts. --- zipline/gens/sort.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/zipline/gens/sort.py b/zipline/gens/sort.py index 668fd087..19e33cb5 100644 --- a/zipline/gens/sort.py +++ b/zipline/gens/sort.py @@ -19,9 +19,6 @@ Sorting generator. import logbook from collections import deque -from zipline.gens.utils import ( - assert_sort_protocol -) log = logbook.Logger('Sorting') @@ -53,7 +50,6 @@ def date_sort(stream_in, source_ids): while all(sources.values()) and not done(sources): message = pop_oldest(sources) - assert_sort_protocol(message) yield message # We should have only a done message left in each queue.