mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-25 13:10:33 +08:00
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user