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

Class ReadVisits

example_code/item_021.py:127–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125
126print("Example 10")
127class ReadVisits:
128 def __init__(self, data_path):
129 self.data_path = data_path
130
131 def __iter__(self):
132 with open(self.data_path) as f:
133 for line in f:
134 yield int(line)
135
136
137print("Example 11")

Callers 1

item_021.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected