title: PyMongo upsert throws "upsert must be an instance of bool" error
body: <p>I'm running an update on my MongoDB from Python. I have this line:</p>
  
  <pre><code>self.word_counts[source].update({'date':posttime},{"$inc" : words},{'upsert':True})
  </code></pre>
  
  <p>But it throws this error:</p>
  
  <pre><code>raise TypeError("upsert must be an instance of bool")
  </code></pre>
  
  <p>But <code>True</code> looks like an instance of bool to me!</p>
  
  <p>How should I correctly write this update?</p>