Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ Counter
Class
Counter
example_code/item_124.py:63–71 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
61
62
print(
"Example 3"
)
63
class
Counter:
64
def
__init__(self):
65
self.value = 0
66
67
def
add(self, offset):
68
value += offset
69
70
def
get(self) -> int:
71
self.value
72
73
74
print(
"Example 4"
)
Callers
1
item_124.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected