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

Class MysteriousResistor

example_code/item_058.py:177–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175
176print("Example 13")
177class MysteriousResistor(Resistor):
178 @property
179 def ohms(self):
180 self.voltage = self._ohms * self.current
181 return self._ohms
182
183 @ohms.setter
184 def ohms(self, ohms):
185 self._ohms = ohms
186
187
188print("Example 14")

Callers 1

item_058.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected