title: Possible to change function name in definition?
body: <p>I tried several ways to change the function name in the definition, but they failed.</p>
  
  <pre><code>&gt;&gt;&gt; def f():
          pass
  &gt;&gt;&gt; f.__name__
  'f'
  &gt;&gt;&gt; def f():
          f.__name__ = 'new name'
  &gt;&gt;&gt; f.__name__
  'f'
  &gt;&gt;&gt; def f():
          self.__name__ = 'new name'
  &gt;&gt;&gt; f.__name__
  'f'
  </code></pre>
  
  <p>But I can change the name attribute after defining it.</p>
  
  <pre><code>&gt;&gt;&gt; def f():
          pass
  &gt;&gt;&gt; f.__name__ = 'new name'
  &gt;&gt;&gt; f.__name__
  'new name'
  </code></pre>
  
  <p>Any way to change/set it in the definition (other than using a decorator)?</p>