r/Python • u/poppy_92 • Jul 31 '26
News PEP 842: Module Exports
https://peps.python.org/pep-0842/
Not the author, but this seems interesting, specially for library authors. Thoughts?
Discussion here - https://discuss.python.org/t/pep-842-module-exports/108353
24
Upvotes
View all comments
Show parent comment
0
u/denehoffman Aug 01 '26
I agree that it will probably be rejected, I’m just saying that a lack of private fields, methods, and APIs is not really as cool as everyone thinks. But also if you look at the PEP, the actual proposed implementation is not really new syntax, you could almost do this in current pure python. Also, I think you can say it’s not pythonic all you want, that’s only because it’s not currently in Python. Lazy imports were also not pythonic and were actively discouraged by linters and now they’re new syntax.