functions are objects too programming languages that overemphasize object-oriented principles tend to frown on functions that are not methods in such languagesyou're expected to create an object to sort of wrap the single method involved there are numerous situations where we' like to pass around small object that is simply called to perform an action this is most frequently done in event-driven programmingsuch as graphical toolkits or asynchronous serverswe'll see some design patterns that use it in python design patterns and python design patterns ii in pythonwe don' need to wrap such methods in an objectbecause functions already are objectswe can set attributes on functions (though this isn' common activity)and we can pass them around to be called at later date they even have few special properties that can be accessed directly here' yet another contrived exampledef my_function()print("the function was called"my_function description " silly functiondef second_function()print("the second was called"second_function description " sillier function def another_function(function)print("the description:"end="print(function descriptionprint("the name:"end="print(function __name__print("the class:"end="print(function __class__print("now 'll call the function passed in"function(another_function(my_functionanother_function(second_functionif we run this codewe can see that we were able to pass two different functions into our third functionand get different output for each onethe descriptiona silly function the namemy_function the classnow 'll call the function passed in