Yury Selivanov added the comment: It's not even a reprlib bug: try: raise Exception except Exception as ex: ex.__context__ = ex hasattr(1, 'aa') ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue25779> _______________________________________