title: How to return from function nicely when multiple return values expected
body: <p>The <code>myFunct</code> is expected to return two values. Both returned values are captured to <code>var_1, var_2</code>.</p>
  
  <p>As an error check I am using a lot of <code>if/else: return</code> statement inside of scope of the function called (<code>myFunct</code> in this case). Typing simple <code>if arg&lt;10: return</code> returns a <strong>single</strong> <code>None</code> which raises <code>TypeError: 'NoneType' object is not iterable</code> since there are two variables: <code>var_1, var_2 = myFunct(5)</code> expecting two returned values but only a single value <code>None</code> is returned.</p>
  
  <p>In order to avoid an error like this I would have to use a following syntax:</p>
  
  <pre><code>if arg&lt;10: return None, None
  </code></pre>
  
  <p>which I find pretty ugly.</p>
  
  <p>I wonder if there is a nicer way to do it...</p>
  
  <pre><code>def myFunct(arg):
      if arg&lt;10:
          return
      return 100, 200
  
  var_1, var_2 = myFunct(5)
  </code></pre>