On Wed, 24 Jul 2019 at 06:32, Kyle Stanley <[email protected]> wrote:
>
> Steve Dower wrote:
> > So I apologise for mentioning that people care about import performance.
> > Let's ignore them/that issue for now and worry instead about making sure
> > people (including us!) know what the canonical reference for
> > public/internal is.
>
> Good point, the discussion about __all__, adding the @public decorator, and 
> worrying about performance impacts might be jumping too far ahead.
>
> For now, if most of the core devs are in agreement with the current unwritten 
> rule of  "unless explicitly documented public, all imports are private even 
> if not prefixed with an underscore", I think the first priority should be to 
> document it officially somewhere. That way, other developers and any 
> potential confused users can be referred to it.

It's not an unwritten rule, as it already has its own subsection in
PEP 8: https://www.python.org/dev/peps/pep-0008/#public-and-internal-interfaces

The main question in this thread is what to do about standard library
modules that were written before those documented guidelines were put
in place, and hence have multiple internal APIs that lack the leading
underscore (and I don't think that's a question with a generic
answer).

Cheers,
Nick.

-- 
Nick Coghlan   |   [email protected]   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/6TNG7J4QEOBCVLGSZ6VBOKKQQBHKPZPF/

Reply via email to