title: Why doesn't __name__ work in this case? AttributeError Raised
body: <p>I am new to programming so when I wanted a command to turn a hard-coded function's name into a string, I looked it up and started using the built-in <code>__name__</code> function. The problem is that I don't think I understand how <code>__name__</code> retrieves the wanted name. I know it has something to do with what is currently visible with local() or dir() but that's about it... (my own research on this topic has been kinda of hard to understand for me) As a result, I stumbled across an error that I don't know how to solve.</p>
  
  <p>Here is some code that recreates my error:</p>
  
  <pre><code>class Abc:
      @staticmethod
      def my_static_func():
          return
  
      def my_method(self):
          return
  
      class_list = [my_static_func]
      method_list = [my_method]
  
  #These calls work
  Abc.my_static_func.__name__
  Abc.my_method.__name__
  Abc.method_list[0].__name__
  
  #But This call raises an AttributeError
  Abc.class_list[0].__name__
  </code></pre>
  
  <p>I get this error message:</p>
  
  <pre><code>AttributeError: 'staticmethod' object has no attribute '__name__'
  </code></pre>
  
  <p>So why is that when I put my static method into a list and then try to get the function's name from the list it doesn't work? Please forgive me if this question is dumb. As you can clearly see, I don't understand the underlying principle of how <code>__name__</code> works (and other stuff that I just don't know about to even give these topics names!). An answer would be nice but a reference to some docs would be also welcome.</p>