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

Method __set__

example_code/item_065.py:200–202  ·  view source on GitHub ↗
(self, instance, value)

Source from the content-addressed store, hash-verified

198 return getattr(instance, self.internal_name, "")
199
200 def __set__(self, instance, value):
201 adjusted_value = self.convert(value)
202 setattr(instance, self.internal_name, adjusted_value)
203
204 def convert(self, value):
205 raise NotImplementedError

Callers

nothing calls this directly

Calls 1

convertMethod · 0.95

Tested by

no test coverage detected