Python Forum

Full Version: code running after tracebacks
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i had mentioned elsewhere that i had seen code run after tracebacks. i found why. this was happening. when developing classes where instantiated a lot with perhaps many references. i was debugging them and adding code to print details in many methods including self.__del__(). when an exception was not handled that was going to abort, it proceeded to gracefully? clean up all the still-referenced objects. so all that self.__del__() code was running after the traceback was printed. you can imagine what would happen if that code had an unhandled exception.