Python3 implementation, chapters 1-8, work-in-progress