logoalt Hacker News

markragesyesterday at 5:16 PM2 repliesview on HN

You have always been able to do the same thing in Python. This PEP isn't needed for that functionality.


Replies

andrewmcwattersyesterday at 5:18 PM

Yeah, I'm aware the same behavior is available, but this proposal creates a call trigger on the dependency which requires far less analysis on larger projects to understand where the import needs to be moved to.

You have to create wrappers in languages like JavaScript, Lua, Python, etc. to create the same behavior.

skywhopperyesterday at 6:32 PM

You can declare imports at the beginning of a program that don’t load until they are used?