MCPcopy Create free account
hub / github.com/bterwijn/memory_graph / generator_has_data

Function generator_has_data

memory_graph/utils.py:190–196  ·  view source on GitHub ↗

Returns 'True' if the generator has data.

(generator)

Source from the content-addressed store, hash-verified

188 return math.floor(value + 0.5)
189
190def generator_has_data(generator):
191 """ Returns 'True' if the generator has data. """
192 try:
193 next(generator)
194 return True
195 except StopIteration:
196 return False

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected