관리-도구
편집 파일: unraisableexception.cpython-311.pyc
� �܋fw � �x � d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ d dlmZ d dlm Z d dlm Z d dlZ G d� d � � Zd ed fd�Z ej d d �� � d ed fd�� � Z ej d d �� � d ed fd�� � Z ej d d �� � d ed fd�� � ZdS )� N)� TracebackType)�Any)�Callable)� Generator)�Optional)�Typec �r � e Zd ZdZd d�Zdd�Zdd�Zd eee d ee dee ddfd�ZdS )�catch_unraisable_exceptiona� Context manager catching unraisable exception using sys.unraisablehook. Storing the exception value (cm.unraisable.exc_value) creates a reference cycle. The reference cycle is broken explicitly when the context manager exits. Storing the object (cm.unraisable.object) can resurrect it if it is set to an object which is being finalized. Exiting the context manager clears the stored object. Usage: with catch_unraisable_exception() as cm: # code creating an "unraisable exception" ... # check the unraisable exception: use cm.unraisable ... # cm.unraisable attribute no longer exists at this point # (to break a reference cycle) �returnNc �"