File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -81,3 +81,10 @@ x in Set([x])
81
81
any(isequal(x), [x])
82
82
```
83
83
84
+ If ` == ` is used instead, you will receive ` TypeError: non-boolean (Num) used in boolean context ` . What this error
85
+ is telling you is that the symbolic ` x == y ` expression is being used where a ` Bool ` is required, such as
86
+ ` if x == y ` , and since the symbolic expression is held lazily this will error because the appropriate branch cannot
87
+ be selected (since ` x == y ` is unknown for arbitrary symbolic values!). This is why the check ` isequal(x,y) ` is
88
+ required, since this is a non-lazy check of whether the symbol ` x ` is always equal to the symbol ` y ` , rather than
89
+ an expression of whether ` x ` and ` y ` currently have the same value.
90
+
You can’t perform that action at this time.
0 commit comments