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

Function fake_get

example_code/item_071.py:110–113  ·  view source on GitHub ↗
(y, x)

Source from the content-addressed store, hash-verified

108seen = set()
109
110def fake_get(y, x):
111 position = (y, x)
112 seen.add(position)
113 return ALIVE if position in alive else EMPTY
114
115count = count_neighbors(10, 5, fake_get)
116assert count == 2

Callers

nothing calls this directly

Calls 1

addMethod · 0.45

Tested by

no test coverage detected