[Python-Dev] Marking GC details as CPython-only
Barry Warsaw
barry at python.org
Wed Feb 13 21:43:28 CET 2013
More information about the Python-Dev mailing list
Wed Feb 13 21:43:28 CET 2013
- Previous message: [Python-Dev] Marking GC details as CPython-only
- Next message: [Python-Dev] Marking GC details as CPython-only
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Feb 13, 2013, at 08:30 PM, Armin Rigo wrote: >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? I've seen *tons* of small Python scripts that don't care about what happens, if anything, at program exit. Some have comments making that quite explicit. Sometimes, they even do so as performance improvements! When you care about start up costs, you often also care about tear down costs. Such scripts just expect that all their resources will get freed when the process exits. Of course, they're not always right (e.g. clean up tmp files), but it's pretty common, and I'm sure not just in Python. OTOH, relying on __del__ to clean up your tmp files seems rather dubious (well, frankly, so does most uses of __del__). Cheers, -Barry
- Previous message: [Python-Dev] Marking GC details as CPython-only
- Next message: [Python-Dev] Marking GC details as CPython-only
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list