def revise(self, data, ignore_none=True):
if not isinstance(data, dict):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>if ignore_none:<EOL><INDENT>for key, value in data.items():<EOL><INDENT>if value is not None:<EOL><INDENT>setattr(self, key, deepcopy(value))<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>for key, value in data.items():<EOL><INDENT>setattr(self, key, deepcopy(value))<EOL><DEDENT><DEDENT>return self<EOL>
Revise attributes value with dictionary data.

:type data: dict
:type ignore_none: bool

**中文文档**

将一个字典中的数据更新到本条文档。当且仅当数据值不为None时。