如何检查框架对象是否处于活动状态
import sys
frame = sys._getframe()
我现在如何检查frame
(类型FRAMETYPE
)仍然处于活动状态(当前执行堆栈跟踪的一部分)?
我可以迭代当前的堆栈跟踪(再次通过sys._getFrame()
),但是是否有更有效或直接的方式?
import sys
frame = sys._getframe()
How can I check now whether frame
(of type FrameType
) is still active (part of the current execution stack trace)?
I could iterate through the current stack trace (again via sys._getframe()
) but is there maybe a more efficient or direct way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论