PYTHON-677 - Really make WriteConcern immutable.

This commit is contained in:
Bernie Hackett 2015-03-19 10:20:03 -07:00
parent 7a49a2947e
commit 648e5beabb

View File

@ -82,8 +82,12 @@ class WriteConcern(object):
@property
def document(self):
"""The document representation of this write concern.
.. note::
:class:`WriteConcern` is immutable. Mutating the value of
:attr:`document` does not mutate this :class:`WriteConcern`.
"""
return self.__document
return self.__document.copy()
@property
def acknowledged(self):