RE: [Python-Dev] Re: atexit missing an unregister method

2005-04-26 Thread Raymond Hettinger
[Raymond Hettinger] > << Will mull it over for a while. My first impression is that try/finally > is a better tool for the scenario you outlined. >> [Nick Jacobson] > You're right. try/finally takes care of my sample scenario. There may > still be a case to be made for atexit.unregister(), th

Re: [Python-Dev] Re: atexit missing an unregister method

2005-04-26 Thread Martin v. Löwis
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() ate