MCPcopy Index your code
hub / github.com/RustPython/RustPython / __setattr__

Method __setattr__

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

Source from the content-addressed store, hash-verified

76 return newpolicy
77
78 def __setattr__(self, name, value):
79 if hasattr(self, name):
80 msg = "{!r} object attribute {!r} is read-only"
81 else:
82 msg = "{!r} object has no attribute {!r}"
83 raise AttributeError(msg.format(self.__class__.__name__, name))
84
85 def __add__(self, other):
86 """Non-default values from right operand override those from left.

Callers 3

__init__Method · 0.45
__init__Method · 0.45
cloneMethod · 0.45

Calls 2

hasattrFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected