def absorb(self, other, ignore_none=True):
if not isinstance(other, self.__class__):<EOL><INDENT>raise TypeError("<STR_LIT>" %<EOL>self.__class__)<EOL><DEDENT>if ignore_none:<EOL><INDENT>for attr, value in other.items():<EOL><INDENT>if value is not None:<EOL><INDENT>setattr(self, attr, deepcopy(value))<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>for attr, value in other.items():<EOL><INDENT>setattr(self, attr, deepcopy(value))<EOL><DEDENT><DEDENT>return self<EOL>
For attributes of others that value is not None, assign it to self.

:type data: ExtendedBase
:type ignore_none: bool

**中文文档**

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