@@ -239,8 +239,8 @@ def update(self, spec, document,
239
239
>>> list(db.test.find())
240
240
[{u'a': u'c', u'x': u'y', u'_id': ObjectId('...')}]
241
241
242
- If `safe` is ``True`` returns the number of documents affected
243
- by the :meth:`update` . Otherwise, returns ``None``.
242
+ If `safe` is ``True`` returns the response to the *lastError*
243
+ command . Otherwise, returns ``None``.
244
244
245
245
:Parameters:
246
246
- `spec`: a ``dict`` or :class:`~pymongo.son.SON` instance specifying
@@ -259,7 +259,7 @@ def update(self, spec, document,
259
259
for that change.
260
260
261
261
.. versionchanged:: 1.3+
262
- Return the number of updated documents if `safe` is ``True``.
262
+ Return the response to *lastError* if `safe` is ``True``.
263
263
.. versionadded:: 1.1.1
264
264
The `multi` parameter.
265
265
@@ -298,8 +298,8 @@ def remove(self, spec_or_object_id=None, safe=False):
298
298
:meth:`~pymongo.database.Database.drop_collection`, however, as
299
299
indexes will not be removed.
300
300
301
- If `safe` is ``True`` returns the number of documents affected
302
- by the :meth:`remove` . Otherwise, returns ``None``.
301
+ If `safe` is ``True`` returns the response to the *lastError*
302
+ command . Otherwise, returns ``None``.
303
303
304
304
:Parameters:
305
305
- `spec_or_object_id` (optional): a ``dict`` or
@@ -310,7 +310,7 @@ def remove(self, spec_or_object_id=None, safe=False):
310
310
- `safe` (optional): check that the remove succeeded?
311
311
312
312
.. versionchanged:: 1.3+
313
- Return the number of removed documents if `safe` is ``True``.
313
+ Return the response to *lastError* if `safe` is ``True``.
314
314
.. versionchanged:: 1.2
315
315
The `spec_or_object_id` parameter is now optional. If it is
316
316
not specified *all* documents in the collection will be
0 commit comments