On Mon, Jul 15, 2013 at 10:01:17AM +1000, Cameron Simpson wrote: > On 15Jul2013 09:48, Steven D'Aprano <steve at pearwood.info> wrote: > | I'd go further, and say that no more private modules should be > | accepted for the std lib unless they have a leading underscore. I > | suppose for backwards compatibility reasons, we probably can't go > | through the std lib and rename private modules to make it clear they > | are private, but we don't have to accept new ones without the > | underscore. > > I disagree. > > A private module is a perfectly sane way to implement the internals > of something, especially if it is subject to implementation change > in the future. Of course private modules are sane. I never suggested "no new private modules at all". But putting them in the same namespace as public modules is not, just to save a leading underscore in the file name. You don't even have to use the underscore in your own code: import _stuff as stuff is allowed, and doesn't make _stuff.py public since imported modules are considered implementation details by default. -- Steven
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4