Using self.* as default value for a method
<pre><code>def save_file(self, outputfilename = self.image_filename): 
    self.file.read(outputfilename)
    ....
</code></pre>

<p>gives <code>NameError: name 'self' is not defined</code>in the first line. It seems that Python doesn't accept it. How can I rewrite the code, so that I does not violate the rules?</p>

<p>...
Please feel free to add tags or change the title.</p>
