diff options
| author | Jon Palmisciano <jp@jonpalmisc.com> | 2022-05-23 11:40:47 -0400 |
|---|---|---|
| committer | Jon Palmisciano <jp@jonpalmisc.com> | 2022-05-23 14:23:17 -0400 |
| commit | 666c5b453f6e821ffc4536c8e8db8871fddcbd0b (patch) | |
| tree | a749ac5b1c52fbe5c34b013ba145324626c56418 /python/variable.py | |
| parent | 666f2e1a7c40400add1253641e0597cc0b624b95 (diff) | |
Fix `ParameterVariables.__{eq,repr}__` implementations
Diffstat (limited to 'python/variable.py')
| -rw-r--r-- | python/variable.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/variable.py b/python/variable.py index 564281c6..07b8863c 100644 --- a/python/variable.py +++ b/python/variable.py @@ -841,7 +841,7 @@ class ParameterVariables: self._func = func def __repr__(self): - return repr(self._vars) + return f"<ParameterVariables: {str(self._vars)}>" def __len__(self): return len(self._vars) @@ -850,6 +850,9 @@ class ParameterVariables: for var in self._vars: yield var + def __eq__(self, other) -> bool: + return (self._vars, self._confidence, self._func) == (other._vars, other._confidence, other._func) + def __getitem__(self, idx) -> 'Variable': return self._vars[idx] |
