8 ms·
imports can't be safely automatically stripped in Python (or even 100% safely re-ordered) since they could have side effects. We run a linter that confirms wit
by ublaze 6y ago
imports can't be safely automatically stripped in Python (or even 100% safely re-ordered) since they could have side effects.
We run a linter that confirms with the user before stripping them, which works out well in practice.
- aitchnyu 6y agoIts apparently true for RPython too, where side effects which cause "methods and other class attributes do not change after startup".