python how to check if a functions been called

Solutions on MaxInterview for python how to check if a functions been called by the best coders in the world

showing results for - "python how to check if a functions been called"
Julienne
14 Jul 2016
1def example():
2    example.has_been_called = True
3    pass
4
5example.has_been_called = False
6
7example()
8
9#Actual Code:
10if example.has_been_called:
11   print("foo bar")