Skip Montanaro <[EMAIL PROTECTED]> added the comment: The attached patch causes an exception to print at exit on my Mac:
>>> import sys, atexit >>> atexit.register(lambda: 1, 0, 0, (x for x in (1,2)), 0, 0) <function <lambda> at 0x5c91e0> >>> sys.exit() Error in atexit._run_exitfuncs: TypeError: print_exception(): Exception expected for value, str found Without the patch I get the same TypeError but it's followed by a Bus error. I don't know if the patch is right or wrong, better or worse than the status quo, but I'll toss it out there for consideration. It certainly seems to subscribe to Christian's theme of calling atexit_cleanup() earlier. ---------- keywords: +patch Added file: http://bugs.python.org/file11517/atexit.diff _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3666> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com