I saw this PEP on Hacker News and wanted to say this is one of the best-written PEPs I’ve read recently. Kudos to Pablo and the entire authoring team. Also I’m very happy to see that the community response here has been overwhelmingly supportive, which really shows how much this is needed
I’ve read through the rejected ideas section on keyword placement, and I understand the backwards compatibility concerns with from X lazy import Y
. That said, I still find myself wishing there was a path forward for that syntax. The current lazy from X import Y
reads awkwardly to me - it breaks the visual pattern of scanning for from ... import
statements that I’ve internalized over years of Python.
I know the authors have heard this feedback multiple times and have solid reasons for their decision. And honestly, the feature is valuable enough that I’ll happily adapt to whatever syntax ships. But if the Steering Council were open to a deprecation path (like the suggested SyntaxWarning for from . module
with extra whitespace), I think it would be worth the transition cost for better long-term ergonomics.
Regardless, this solves real problems I hit constantly with import overhead in production systems. Really looking forward to having a standard solution instead of fragile workarounds.