Comment

Comment by miohtama

Python imports and slow startup speed hurts Python developers on moderate and large projects. It's the downside of nothing having more static module exports. I believe JS/TypeScript folks try to avoid this trap. In Python, to know what things module exports you need to run the module, there is no static analysis way to find out it otherwise.

Making imports fast for data classes may solve some of the problems. Old big projects like Plone/Zope have solved this problem by making more generic lazy import system that it extensively being used.

Use zope.deferredimport package for this:

https://zopedeferredimport.readthedocs.io/en/latest/narrativ...

Though I am not sure if zope.deferredimport has been updated to play nicely with the modern typing tools like editors and MyPy.

parent miohtama 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton