This is really good, but I had a thought while reading this that you can feel free to ignore right now, since there isn't a problem with your code.

section_emailcode -> ClassSubject and section_emailcode -> ClassSection both seem like really useful transformations to be able to easily reuse. Perhaps we should add staticmethods to ClassSubject and ClassSection to do exactly that, and then make use of them here.