Built-in predicate checkers¶
These are the predicate checkers that are included with repoze.what
:
The base Predicate
class¶
Predicate
is the parent class of every predicate checker and its API
is described below:
Single predicate checkers¶
Compound predicate checkers¶
You may create a compound predicate by aggregating single (or even compound) predicate checkers with the functions below:
But you can also nest compound predicates:
p = All(Any(is_month(4), is_month(10)), has_permission('release'))
Which may be translated as “Anyone granted the ‘release’ permission may release a version of Ubuntu, if and only if it’s April or October”.