title: Pymongo: How to check if the update was successful ?
body: <p>How to check if the update was successful in Pymongo? If the record was updated with the same value it should be considered a successful update. ie, Even if the modified count is zero it is considered a successful update. How to do this. </p>
  
  <pre><code>result = _db.testcollection.update_one({"_id": col_id}, {"$set": obj})
  return True if result.modified_count &gt; 0 else False
  </code></pre>
  
  <p>This works well if the value is changed. But I want to return true even when technically the record was not changed because the record is same what we are trying to update.</p>
  
  <p>How to do this?</p>