How can I avoid querying the set object sol unnecessarily in this list comprehension? Currently, I query it twice for each object, once in the ternary and once in the predicate. However, I cannot think of a more elegant solution. Is there one? unn
How can I avoid querying the set object sol unnecessarily in this list comprehension? Currently, I query it twice for each object, once in the ternary and once in the predicate. However, I cannot think of a more elegant solution. Is there one? unn