

Join the discussion
Write your take first — we'll ask for email only when you're ready to publish.
- Hacker News
- Some folks at HRT[0] will probably be unhappy about that lol
0.https://www.hudsonrivertrading.com/hrtbeat/inside-hrts-pytho...
by curiousgal - Given you can already trigger import in a local scope, it's merely a syntax sugar though.by mmis1000
- This will be huge at the place I work!
I’m unfamiliar with the PEP process. How long until this makes it into a Python version?
by johnfn - Source phase imports are stage 3 (recommended for implementation, no major updates expected) in JS. "Import source" tells the runtime to go get the code, but not yet run it. Similar ideas seemingly to what's going on here in python! https://github.com/tc39/proposal-source-phase-imports
- That was fast. It was sent to SC 20 days ago. (Not complaining. I am happy with the outcome).by ayhanfuat
- Source link indicating PEP 810 was accepted:
https://discuss.python.org/t/pep-810-explicit-lazy-imports/1...
by alberth - Python is quickly turning into a crowded keyword junkyardby nothrowaways
- How will lazy imports interact with PEP 8 which recommends grouping imports in order:
1. Standard library imports.
2. Related third party imports.
3. Local application/library specific imports.
https://peps.python.org/pep-0008/#imports
Based on the examples in PEP 810, I suppose each group of regular imports can be followed by a group of lazy imports?
import os import sys lazy import json import fastapi lazy import numpy import myapi import mymodels lazy import myutils ...by divbzero