Re: Lazy Imports -- I Like This Idea
Lawrence D’Oliveiro <[email protected]> Mon, 30 Mar 2026 02:17:42 -0000 (UTC)
| Newsgroups | comp.lang.python |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
On Sun, 29 Mar 2026 19:03:12 -0700, Paul Rubin wrote: > Lawrence D’Oliveiro <[email protected]> writes: >> >> I don’t think it will be needed for a great many modules. In my >> case, it was only ever an issue with matplotlib. > > I defer importing bs4 sometimes, depending on what I'm doing. That same script imports bs4, as it happens. It still manages an overall startup time of just a quarter second.