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 <rep...@bugs.python.org>
<http://bugs.python.org/issue22696>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to