MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / __setattr__

Method __setattr__

example_code/item_061.py:151–153  ·  view source on GitHub ↗
(self, name, value)

Source from the content-addressed store, hash-verified

149print("Example 9")
150class LoggingSavingRecord(SavingRecord):
151 def __setattr__(self, name, value):
152 print(f"* Called __setattr__({name!r}, {value!r})")
153 super().__setattr__(name, value)
154
155data = LoggingSavingRecord()
156print("Before: ", data.__dict__)

Callers

nothing calls this directly

Calls 1

__setattr__Method · 0.45

Tested by

no test coverage detected