MCPcopy Create free account
hub / github.com/clab/dynet / __iter__

Method __iter__

examples/python-utils/util.py:51–58  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

49 self.begin = begin
50
51 def __iter__(self):
52 begin = self.begin
53 with open(self.fname) as f:
54 for line in f:
55 line = list(line)
56 if begin:
57 line = [begin] + line
58 yield line

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected