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

Method __get__

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

Source from the content-addressed store, hash-verified

210
211 print("Example 15")
212 def __get__(self, instance, instance_type):
213 if instance is None:
214 return self
215 return getattr(instance, self.internal_name)
216
217 def __set__(self, instance, value):
218 if not (0 <= value <= 100):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected