Skip to content

Rules as list #24

Answered by zeroSteiner
Nik3181 asked this question in Q&A
Aug 20, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

If you have one rule and many objects, you'd want to use the Rule.filter method. If you have many rules and one object, you'd need to initialize a Rule object for each and apply them to your object like: [rule_text for rule_text in all_rule_texts if Rule(rule_text).matches(object)].

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Nik3181
Comment options

@tejesh-p
Comment options

Answer selected by zeroSteiner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants