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

Function missing

example_code/item_048.py:82–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80 added_count = 0
81
82 def missing():
83 nonlocal added_count # Stateful closure
84 added_count += 1
85 return 0
86
87 result = defaultdict(missing, current)
88 for key, amount in increments:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected