ipython / ipython/traitlets

Possible move of comparison to a separate function inside set

Open
#277 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
653
Forks
217
Avg merge
2d 21h
Merged PRs (30d)
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.