Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/bslatkin/effectivepython
/ map
Method
map
example_code/item_052.py:82–84 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
80
print(
"Example 4"
)
81
class
LineCountWorker(Worker):
82
def
map(self):
83
data = self.input_data.read()
84
self.result = data.count(
"\n"
)
85
86
def
reduce(self, other):
87
self.result += other.result
Callers
nothing calls this directly
Calls
1
read
Method · 0.45
Tested by
no test coverage detected