This pattern (`start_foo`, `end_foo`, and `do_something_with_foo`) is often implemented with a context manager. You could, for instance, aim for the interface:

    with grading_table.add_row(student_id) as row:
        for grade in grades:
            row.add_grade(grade.component, grade.score)

Then you would use the `@contextmanager` decorator to implement `add_row`.