PYTHON-677 - Really make WriteConcern immutable.
This commit is contained in:
parent
7a49a2947e
commit
648e5beabb
@ -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):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user