Nick Jacobson wrote:
> You're right. try/finally takes care of my sample scenario. There may
> still be a case to be made for atexit.unregister(), though.
No. Anybody in need of such a feature can easily unregister it.
allregistrations=[]
def _run():
for fn in allregistrations:
fn()
atexit.register(_run)
def register(fn):
allregistrations.append(fn)
def unregister(fn):
allregistrations.remove(fn)
Regards,
Martin
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com