I've noticed that instead of defining requires at the top of Lua files, if you can know your own program well enough, defining them right before the dependency is actually used makes large Lua programs much, much quicker. Generally speaking, startup times can be a sped up by a meaningful factor.
I suspect this change in Python will dramatically improve the performance of such large programs as well.
You have always been able to do the same thing in Python. This PEP isn't needed for that functionality.
> I suspect this change in Python will dramatically improve the performance of such large programs as well.
Makes packaging super fun too, where you need to hit every possible path so you don't miss anything imported in 1% of the execution paths :)