This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skip.montanaro
Recipients ajaksu2, christian.heimes, skip.montanaro
Date 2008-09-18.12:21:22
SpamBayes Score 2.0349043e-08
Marked as misclassified No
Message-id <1221740486.46.0.589522226306.issue3666@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-09-18 12:21:26skip.montanarosetrecipients: + skip.montanaro, christian.heimes, ajaksu2
2008-09-18 12:21:26skip.montanarosetmessageid: <1221740486.46.0.589522226306.issue3666@psf.upfronthosting.co.za>
2008-09-18 12:21:23skip.montanarolinkissue3666 messages
2008-09-18 12:21:23skip.montanarocreate