📜  python如何检查函数是否被调用 - Python代码示例

📅  最后修改于: 2022-03-11 14:46:58.303000             🧑  作者: Mango

代码示例1
def example():
    example.has_been_called = True
    pass

example.has_been_called = False

example()

#Actual Code:
if example.has_been_called:
   print("foo bar")