diff --git a/IPython/extensions/autoreload.py b/IPython/extensions/autoreload.py index ca6be10..4edd3b3 100644 --- a/IPython/extensions/autoreload.py +++ b/IPython/extensions/autoreload.py @@ -274,7 +274,9 @@ def update_class(old, new): old_obj = getattr(old, key) try: new_obj = getattr(new, key) - if old_obj == new_obj: + # explicitly checking that comparison returns True to handle + # cases where `==` doesn't return a boolean. + if (old_obj == new_obj) is True: continue except AttributeError: # obsolete attribute: remove it