title: return on negative condition vs if block
body: <p>If I have a function which should perform an action on some condition, and returns null instead, which is cleaner:</p>
  
  <pre><code>def func():
      if not condition:
          return None
  
      [...]
      return asd
  </code></pre>
  
  <p>or</p>
  
  <pre><code>def func():
      if condition:
          [...]
          value = asd
      else:
          value = None
  
      return value
  </code></pre>
  
  <p>I've read the paradigm that every function should have one returning point. On the other hand the zen of python says that flat is better than nested and later version adds one nested level above the whole action code ( marked as [...]).</p>
  
  <p>Please also bear in mind that conditions could be more complicated and for example, add more than one nesting level.</p>