title: Non-Standard Optional Argument Defaults
body: <p>I have two functions:</p>
  
  <pre><code>def f(a,b,c=g(b)):
      blabla
  
  def g(n):
      blabla
  </code></pre>
  
  <p><code>c</code> is an optional argument in function <code>f</code>. If the user does not specify its value, the program should compute g(b) and that would be the value of <code>c</code>. But the code does not compile - it says name 'b' is not defined. How to fix that?</p>
  
  <p>Someone suggested:</p>
  
  <pre><code>def g(b):
      blabla
  
  def f(a,b,c=None):
      if c is None:
          c = g(b)
      blabla
  </code></pre>
  
  <p>But this doesn't work. Maybe the user intended <code>c</code> to be None and then <code>c</code> will have another value.</p>