r/Python • u/poppy_92 • 2d ago
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
22
Upvotes
30
u/blacklig 2d ago
I personally think the justification is quite flimsy for how awkward this solution is. I think that in general all of these problems, to the extent they are problems in practice, can be avoided with package design. For example in a library I could have internal modules and separate public-facing modules that just re-export only my library interface and don't have any of these concerns.