I am not sure exactly what this means or how it is used, but i came across this functionality when it comes to a function. I am able to dynamically add attributes to a function. Can someone help me understand what is the use of this and how does it happen? I mean its a function name after all, how can we add attributes to it dynamically?
def impossible():
print "Adding a bool"
impossible.enabled = True
# i was able to just do this. And this is a function, how does this add up?
print(impossible.enabled) # No attribute error. o/p --> True