MCPcopy Index your code
hub / github.com/bslatkin/effectivepython / __get__

Method __get__

example_code/item_060.py:182–185  ·  view source on GitHub ↗
(self, instance, instance_type)

Source from the content-addressed store, hash-verified

180 self._values = {}
181
182 def __get__(self, instance, instance_type):
183 if instance is None:
184 return self
185 return self._values.get(instance, 0)
186
187 def __set__(self, instance, value):
188 if not (0 <= value <= 100):

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected