MCPcopy Index your code
hub / github.com/bslatkin/effectivepython / lengths_handle

Function lengths_handle

example_code/item_089.py:150–156  ·  view source on GitHub ↗
(handle)

Source from the content-addressed store, hash-verified

148
149print("Example 11")
150def lengths_handle(handle):
151 try:
152 for i, line in enumerate(handle):
153 print(f"Line {i}")
154 yield len(line.strip())
155 finally:
156 print("Finally lengths_handle")
157
158
159print("Example 12")

Callers 1

item_089.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected