MCPcopy Index your code
hub / github.com/python/cpython / _become_message

Method _become_message

Lib/mailbox.py:1593–1598  ·  view source on GitHub ↗

Assume the non-format-specific state of message.

(self, message)

Source from the content-addressed store, hash-verified

1591 raise TypeError('Invalid message type: %s' % type(message))
1592
1593 def _become_message(self, message):
1594 """Assume the non-format-specific state of message."""
1595 type_specific = getattr(message, '_type_specific_attributes', [])
1596 for name in message.__dict__:
1597 if name not in type_specific:
1598 self.__dict__[name] = message.__dict__[name]
1599
1600 def _explain_to(self, message):
1601 """Copy format-specific state to message insofar as possible."""

Callers 2

__init__Method · 0.95
test_become_messageMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_become_messageMethod · 0.64