[Python-3000] atexit module problems/questions

skip at pobox.com skip at pobox.com
Sun Aug 5 04:48:18 CEST 2007


 skip> Given that sys.exitfunc is gone is there a reason to have
 skip> _run_exitfuncs? Who's going to call it?
 Christian> Unit tests? Some developers might want to test their
 Christian> registered functions.
Your tests can just fork another instance of Python which prints:
 python -c 'import atexit
def f(*args, **kwds):
 print("atexit", args, kwds)
atexit.register(f, 1, x=2)
'
and have your test case expect to see the appropriate output.
Skip


More information about the Python-3000 mailing list

AltStyle によって変換されたページ (->オリジナル) /