Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ Tool
Class
Tool
example_code/item_100.py:57–63 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
55
56
print(
"Example 2"
)
57
class
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})"
64
65
tools = [
66
Tool(
"level"
, 3.5),
Callers
1
item_100.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected