[issue22696] Add a function to know about interpreter shutdown
STINNER Victor
report at bugs.python.org
Wed Oct 22 14:32:16 CEST 2014
STINNER Victor added the comment:
For the issue #22599, I wrote a patch but then I removed my patch and reverted my changed...
Here is a new patch which implements why I already wrote: add a new sys._is_finalizing() function, with a unit test.
> I propose to add a new function sys.shutting_down() (name debatable)
The name sounds like a function to shut down the computer or exit Python.
I don't like _is_finalizing() name neither :-)
My patch uses a private function which is CPython specific. Does it make sense to add a public function instead? Is it possible to implement it in any Python implementation (PyPy, IronPython, Jython, etC.)? I guess that the most dummy implementation is to always return False (Python is always running.
----------
keywords: +patch
Added file: http://bugs.python.org/file36992/is_finalizing.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22696>
_______________________________________
More information about the Python-bugs-list
mailing list