-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
We should allow to specify conditions in a more natural form, i.e. right now conditions have to be given as key__op : value but I would prefer key op value:
if:
- key == 5
- key > 5
- key <= 5
#etc.
The generic format would be:
attr1.[...].attrN [op value]
If [op value] is ommitted, this is equivalent to specifying [== True]
Currently operators that are supported are:
- bool conversion
- comparison
- string operators (contains/icontains)
Key supports lookup for:
- attr
- dictionary
Also, I think we should emulate django templates' behavior an call attrs if they are callable. This means that we'll have support for simple function calls (with no arguments). Actually passing parameters can't be expressed in the C-exp bit specification, so it would require a substantial rewrite.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels