You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
But we need to have results on the right, so we can't have args there. To be more specific, let's look for a way to define math.sqrt(foo) > 2. I don't think this can be done elegantly.
I have an idea that can work, will open a separate issue - don't want to derail discussion for this one.
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 preferkey op value
: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:
Key supports lookup for:
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.
The text was updated successfully, but these errors were encountered: