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

Method __get__

example_code/item_065.py:195–198  ·  view source on GitHub ↗
(self, instance, instance_type)

Source from the content-addressed store, hash-verified

193 self.internal_name = "_" + column_name
194
195 def __get__(self, instance, instance_type):
196 if instance is None:
197 return self
198 return getattr(instance, self.internal_name, "")
199
200 def __set__(self, instance, value):
201 adjusted_value = self.convert(value)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected