Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python how to check if a functions been called

def example():
    example.has_been_called = True
    pass

example.has_been_called = False

example()

#Actual Code:
if example.has_been_called:
   print("foo bar")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #check #functions #called
ADD COMMENT
Topic
Name
2+2 =