I will use collection.save(the_changed_dict)
this way. I've just tested this, and it still works for me. The following is quoted directly from pymongo doc.
:
save(to_save[, manipulate=True[, safe=False[, **kwargs]]])
Save a document in this collection.
If to_save already has an "_id" then an update() (upsert) operation is performed and any existing document with that "_id" is overwritten. Otherwise an insert() operation is performed. In this case if manipulate is True an "_id" will be added to to_save and this method returns the "_id" of the saved document. If manipulate is False the "_id" will be added by the server but this method will return None.