This exception is derived from RuntimeError. It is raised when an operation is blocked during interpreter shutdown also known as Python finalization.
Examples of operations which can be blocked with a PythonFinalizationError during the Python finalization:
See also the sys.is_finalizing() function.
修改记录:English prose extracted; whitespace normalized; Korean context and classified official links added. Python code examples not redistributed. 译文说明已标注为自动翻译。