Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __select_items_for(self, query):
processed_collection = list(self.collection)
for expression in query.expressions:
klass = BinaryExpressionProcessor()
processed_collection = klass.process(processed_collection, expression)
if query.order_expressions:
self.order_expressions = query.order_expressions
processed_collection.sort(self.compare_items)
return processed_collection