Skip to content

Commit

Permalink
Avoid equality check on Watcher (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Mar 31, 2022
1 parent becf81b commit 9bce415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion param/parameterized.py
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,7 @@ def _call_watcher(self_, watcher, event):

if self_.self_or_cls.param._BATCH_WATCH:
self_._events.append(event)
if watcher not in self_._watchers:
if not any(watcher is w for w in self_._watchers):
self_._watchers.append(watcher)
else:
event = self_._update_event_type(watcher, event, self_.self_or_cls.param._TRIGGER)
Expand Down

0 comments on commit 9bce415

Please sign in to comment.