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

Class MyIntegerSubclass

example_code/item_055.py:130–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128
129print("Example 10")
130class MyIntegerSubclass(MyStringClass):
131 def get_value(self):
132 return int(self._MyStringClass__value)
133
134foo = MyIntegerSubclass("5")
135assert foo.get_value() == 5

Callers 1

item_055.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected