equal
deleted
inserted
replaced
205 return wa, _optimizeandops(op, ta, tb) |
205 return wa, _optimizeandops(op, ta, tb) |
206 else: |
206 else: |
207 return wb, _optimizeandops(op, tb, ta) |
207 return wb, _optimizeandops(op, tb, ta) |
208 if op == 'or': |
208 if op == 'or': |
209 ws, ts = zip(*(_optimize(y) for y in x[1:])) |
209 ws, ts = zip(*(_optimize(y) for y in x[1:])) |
|
210 ts = tuple(it[1] for it in sorted(enumerate(ts), |
|
211 key=lambda it: ws[it[0]])) |
210 return max(ws), (op,) + ts |
212 return max(ws), (op,) + ts |
211 if op == 'list': |
213 if op == 'list': |
212 ws, ts = zip(*(_optimize(y) for y in x[1:])) |
214 ws, ts = zip(*(_optimize(y) for y in x[1:])) |
213 return sum(ws), (op,) + ts |
215 return sum(ws), (op,) + ts |
214 if op == 'func': |
216 if op == 'func': |