A 1,500 line switch statement that powers your Python
slideshare.net
slideshare.net
Kind of related, this post [1] mentioned some ideas to break it down into smaller modules without losing performance with tail calls.
[1] https://blog.reverberate.org/2021/04/21/musttail-efficient-i...