atexit functionality

Steve Holden sholden at holdenweb.com
Wed Apr 9 05:40:52 EDT 2003


[posted and mailed]

----- Original Message -----
From: <viszneki at telerama.com>
Newsgroups: comp.lang.python
Sent: Tuesday, April 08, 2003 1:30 PM
Subject: atexit functionality


> I am not a member of the Python mailing list, I dont' have the time to
read any
> mailing lists at the moment. So if someone could please respond to me
> personally, that would be great.
>
> Generally speaking I have a lot of objects that clean themselves up before
> python actually exits, so I was wondering if a deregister function could
be
> provided.
>
> Rather than a deregister function, I thought about making the following
> modification to atexit.py after _exithandlers.append((func,targs,kargs))
>
> return _exithandlers[len(_exithandlers)]
>
> My intention is to be able to store the returned value as a member
variable in
> a class that registers its own cleanup functions. But if the class cleans
> itself up, the class could "clean up" its cleanup registration with atexit
by
> saying something like del self.cleanup
>
> I hope my ideas are well received! I think they will be because this
> modification is fully backward compatible, and doesn't introduce any
negative
> side effects or anything like that.
>
> Thanks for your time,
> Donny Viszneki.
>
> ps, could someone please personally respond to my email address
> viszneki at telerama.com about any decisions made about my idea? thanks a
lot.
>
Donny:

Effectively, what you just did is to say "I'm far too busy to engage fully
in this news group, so please waste your time responding privately to my
suggestion in such a way that the group is unlikely to effectively benefit
from anything positive that might happen as a result of this post."

Not terribly good netiquette, that. I hope you get the replies you wanted as
well as this rather grumpy message.

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/
Did you miss PyCon DC 2003?            Would you come to PyCOn DC 2004?







More information about the Python-list mailing list