1 に答える
1
(または)reduce
で使用:operator.or_
lambda a, b: a | b
limit = reduce(operator.or_, (Q(**condition) for condition in model_list))
于 2015-01-13T15:08:48.320 に答える
(または)reduce
で使用:operator.or_
lambda a, b: a | b
limit = reduce(operator.or_, (Q(**condition) for condition in model_list))