PEP 842 – Module Exports
peps.python.org
PEP 842 – Module Exports
1–2 of 2 posts
Re: PEP 842 – Module Exports
#2When I saw the initial discussion I was confused as to how it's supposed to actually add functionality, but I see the current draft proposes an `ExportWarning` for explicit use of non-exported attributes. That... seems like it's going to slow down attribute access, while still being just a warning that's easily ignored and probably not even seen in a lot of contexts where it would be helpful. Also, this will define a default `__all__` when that's missing, but I can imagine some gotchas for people trying to use both systems.
The concept seems more elegant that `__all__` in itself, but once again backwards compatibility concerns add complexity.