title: Class method as default __init__ argument
body: <p>I am trying to set a default function in the class constructor. Caveat is that the function is from within the same class.</p>
  <pre><code>Class MyClass:
      def __init__(self, filename, file_rename_func=filename_parser):
          self.filename = filename
          self.file_rename_func = file_rename_func
  
      def filename_parser(self, filename)
          return filename + '. Hi, StackOverflow!'
  </code></pre>
  <p>This keeps giving me the error:
  <code>NameError: name 'filename_parser' is not defined</code></p>
  <p>If I were to instead have the <code>__init__</code> function look like this:</p>
  <pre><code>def __init__(self, filename, file_rename_func=self.filename_parser):
  </code></pre>
  <p>I get <code>NameError: name 'self' is not defined</code></p>
  <p>How can I get around this issue if I must have this done in the constructor?</p>