Possible move of comparison to a separate function inside set
Ouverte
- Langage dominant
- Python
- Étoiles
- 653
- Forks
- 217
- Merge moyen
- 2 j 21 h
- PR mergées (30 j)
- 2
Description
``` python
try:
silent = bool(old_value == new_value)
except:
# if there is an error in comparing, default to notify
silent = False
```
When `==` doesn't work (think `np.array` or `pd.DataFrame`), this is equivalent to failing silently in some sense. We should move this section to a separate compare function that can be overload by a `TraitType` so the entire logic of `set` doesn't need to be copied.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.