Re:Python's Hidden Regular Expression Gems
by andreasvc on Sunday November 22, 2015 @09:14AM
(#10610096)
The language cannot force it but can encourage it. Having to make the choice between private and public is worthwhile I think.
> being able to do dir(lib) and see the namespace that is in use is a good thing.
It is, but it is most useful when what you get a curated list of members (__all__) intended to be public.
Like how would a language that uses explicit exports stop someone exporting everything?
I agree that accessing libraries indirectly probably isn't useful, but I think being able to do dir(lib) and see the namespace that is in use is a good thing (at least in the context of Python).