Just because du to the side tracking it is looking like "it might be a nice idea":
IMHO, this is not. and I second Brendan's arguments -

This fix too litle, and normally just for beginners who happen to use * imports in code
that will selfon be put to critical use. (and even if it does, the extra names from "*" won't
break it). 

On the other hand doing from `import submodule` just to make submodule available in
a package `__init__` is a very nice practice, and it would make a lot of developers have to 
review a lot, really lot, of well written software just to add explicit `__all__` declarations.

I am as "-1" on this as possible. 

   js
  -><-

On Wed, 18 Sep 2019 at 22:20, Christopher Barker <pythonchb@gmail.com> wrote:

On Wed, Sep 18, 2019 at 9:04 AM Serhiy Storchaka <storchaka@gmail.com> wrote:
26.07.19 20:43, Serhiy Storchaka пише:
> I propose to change the rule for determining the set of public names if
> `__all__` is not defined. In addition to underscored names I propose to
> exclude names of modules.

I like this — but think it’s way too late. It could break a fair bit of code.

To the extent that import * is used at all ;-)

I, at least, do a lot of importing of modules in __init__.py Simply to make the names available.

I don’t encourage import * either, but that doesn’t mean my users don’t use it.

-CHB



Opened an issue and a PR:

https://bugs.python.org/issue38215
https://github.com/python/cpython/pull/16263
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/CEC2N4NIYBVCFORUQ3M4MRGSRXYGEFA5/
Code of Conduct: http://python.org/psf/codeofconduct/
--
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/YZFB4TTCFSQGI4AUMCNWTNS5QYNO3FQD/
Code of Conduct: http://python.org/psf/codeofconduct/