Show More
@@ -371,7 +371,12 b' class TraitType(object):' | |||||
371 | new_value = self._validate(obj, value) |
|
371 | new_value = self._validate(obj, value) | |
372 | old_value = self.__get__(obj) |
|
372 | old_value = self.__get__(obj) | |
373 | obj._trait_values[self.name] = new_value |
|
373 | obj._trait_values[self.name] = new_value | |
374 | if old_value != new_value: |
|
374 | try: | |
|
375 | notify = (old_value != new_value) | |||
|
376 | except: | |||
|
377 | # if there is an error in comparing, default to notify | |||
|
378 | notify = True | |||
|
379 | if notify: | |||
375 | obj._notify_trait(self.name, old_value, new_value) |
|
380 | obj._notify_trait(self.name, old_value, new_value) | |
376 |
|
381 | |||
377 | def _validate(self, obj, value): |
|
382 | def _validate(self, obj, value): |
General Comments 0
You need to be logged in to leave comments.
Login now