Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
鉴于这样的事情:
@my_decorator my_function(some, args)
my_decorator 是否可以发现调用 my_function 的文件和行号?
谢谢
traceback.extract_stack()将允许您检查当前堆栈帧。
traceback.extract_stack()