[Python-Dev] Marking GC details as CPython-only (original) (raw)

Maciej Fijalkowski fijall at gmail.com
Wed Feb 13 21:19:22 CET 2013


On Wed, Feb 13, 2013 at 9:40 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:

On Wed, 13 Feb 2013 20:30:18 +0100 Armin Rigo <arigo at tunes.org> wrote:

Hi,

On Wed, Feb 13, 2013 at 8:22 PM, Maciej Fijalkowski <fijall at gmail.com> wrote: > I think it's well documented you should not rely on stuff like that > being run at the exit of the interpreter. Actually right now, at the exit of the interpreter, we just leave the program without caring about running any del. This might mean that in a short-running script no del is ever run. I'd add this question to your original list: is it good enough, or should we try harder to run destructors at the exit? Destructors should be run at exit like they would be in any other finalization situation. Anything else is dangerous, since important resources may not be finalized, committed, or released. (and by destructors I also mean weakref callbacks) Regards Antoine.

I think Antoine is right (despite the fact that CPython docs clearly state that __del__s might not be run on the interpreter exit actually)

Cheers, fijal



More information about the Python-Dev mailing list