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

Method __init__

example_code/item_029.py:213–214  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

211print("Example 12")
212class Gradebook:
213 def __init__(self):
214 self._students = defaultdict(Student)
215
216 def get_student(self, name):
217 return self._students[name]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected