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

Method __init__

example_code/item_055.py:52–54  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

50print("Example 1")
51class MyObject:
52 def __init__(self):
53 self.public_field = 5
54 self.__private_field = 10
55
56 def get_private_field(self):
57 return self.__private_field

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected