Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
108
seen = set()
109
110
def
fake_get(y, x):
111
position = (y, x)
112
seen.add(position)
113
return
ALIVE
if
position in alive
else
EMPTY
114
115
count = count_neighbors(10, 5, fake_get)
116
assert count == 2
Callers
nothing calls this directly
Calls
1
add
Method · 0.45
Tested by
no test coverage detected