This advice dates back to when Python was primarily used by scientists to drive simulations. I remember hearing this advice in the early 2000s as a physics student using vpython to drive N-body simulations. They told us to do the physics in C, but everything else in Python due to the simulation math taking too long in raw Python. We couldn’t make the visualization run at a reasonable frame rate without those optimizations.
These days Python is being used for everything, even things without hot loops as you note. Yet the advice persists.
These days Python is being used for everything, even things without hot loops as you note. Yet the advice persists.