Decorators: returning the 'wrapper' function: what does that do exactly?

Hi all,

Thank you for reading this. I’m currently watching the “What Are Decorators?” video under Learn Python: Decorators.

This is the portion of the code that I have a question about:

 def title_decorator(print_name_function):
      def wrapper():
           print("Professors: ")
           print_name_function()
      return wrapper

Returning a function like that should return information about where that function is stored etc etc. Why would that be useful in this case?