title: Why python return None object?
body: <p>I have the following function:</p>
  
  <pre><code>def isEmptyRet(self, cmdr, overIterate):
     //some code which changes the cmdr object
     if (some condition):
       //some code
     else:
       print("got to this point")
       print(cmdr)
       return cmdr
  </code></pre>
  
  <p>The console prints the following:</p>
  
  <pre><code>got to this point
  {'ap': {'file
     //and some other parameters in JSON
    }}}
  </code></pre>
  
  <p>This function is called by the following function:</p>
  
  <pre><code> def mod(self, tg):
    //some code
       cmdr = self.local_client.cmd(
              tg, func
     )
     //some code..
     cmdr = self.isEmptyRet(cmdr, False)
     print(cmdr)
  </code></pre>
  
  <p>Now, the console print: <code>None</code></p>
  
  <p>But the function <code>isEmptyRet</code> return object, which is not none (as we see in the console).</p>
  
  <p>What can be the reason?</p>