Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always include types in the engine's definition of equality. (#10377)
### Problem I spent a few hours debugging why a boolean param was turning into an integer in some cases in the simple test in #10230, and determined that it was due to the behavior that `1 == True` and `0 == False` in Python. This impacts the engine in strange ways. For example: before the fix, the test in this change that attempts to use both a `bool` and an `int` fails with: ``` Exception: Values used as `Params` must have distinct types, but the following values had the same type (`int`): 1 1 ``` ### Solution Always include types in the engine's definition of equality. Although this affects more than just memoization/interning, my expectation is that in any possible position where the engine will use `equals` the default behavior would be undesirable.
- Loading branch information