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

Method __setattr__

Lib/email/_policybase.py:87–92  ·  view source on GitHub ↗
(self, name, value)

Source from the content-addressed store, hash-verified

85 return newpolicy
86
87 def __setattr__(self, name, value):
88 if hasattr(self, name):
89 msg = "{!r} object attribute {!r} is read-only"
90 else:
91 msg = "{!r} object has no attribute {!r}"
92 raise AttributeError(msg.format(self.__class__.__name__, name))
93
94 def __add__(self, other):
95 """Non-default values from right operand override those from left.

Callers 3

__init__Method · 0.45
__init__Method · 0.45
cloneMethod · 0.45

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected