What is the recommended structure to write validate functions with many conditions? See these two examples. The first looks ugly, the second isn\'t very common, perhaps because
The first way is much better. It can be prettified a little bit using any():
any()
def validate_conditions(value): return not any((condition(value) for condition in conditions))