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

Class MyStringClass

example_code/item_055.py:118–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116
117print("Example 9")
118class MyStringClass:
119 def __init__(self, value):
120 self.__value = value
121
122 def get_value(self):
123 return str(self.__value)
124
125foo = MyStringClass(5)
126assert foo.get_value() == "5"

Callers 1

item_055.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected