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

Method __init__

example_code/item_100.py:58–60  ·  view source on GitHub ↗
(self, name, weight)

Source from the content-addressed store, hash-verified

56print("Example 2")
57class Tool:
58 def __init__(self, name, weight):
59 self.name = name
60 self.weight = weight
61
62 def __repr__(self):
63 return f"Tool({self.name!r}, {self.weight})"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected