title: Python: pass "not" as a lambda function
body: <p>I need to pass a function as a parameter that works as the boolean "not". I tried something like this but it didn't work because <code>not</code> isn't a function.</p>
  
  <pre><code>theFunction(callback=not) # Doesn't work :(
  </code></pre>
  
  <p>I need to do the following, but <strong>I wonder if there exists any predefined function that does this simple job</strong>, so that I don't have to redefine it like this:</p>
  
  <pre><code>theFunction(callback=lambda b: not b, anotherCallback=lambda b: not b)
  </code></pre>
  
  <hr>
  
  <p><strong><em>Note:</strong> I can't change the fact that I have to pass a function like this because it's an API call.</em></p>