MCPcopy 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

80print("Example 4")
81class 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

readMethod · 0.45

Tested by

no test coverage detected