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

Method add_student

example_code/item_029.py:83–84  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

81 self._grades = {} # Outer dict
82
83 def add_student(self, name):
84 self._grades[name] = defaultdict(list) # Inner dict
85
86 def report_grade(self, name, subject, grade):
87 by_subject = self._grades[name]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected