Inada Naoki <songofaca...@gmail.com> added the comment:

Searching into directory without __init__.py recursively is not only 
inefficient, but also dangerous.

 project/
   - mylib/
      - __init__.py
      - foo.py
   - tests/
      - __init__.py
      - test_foo.py
   - tools/
      - bin/
          - dangerous_script.py

What happens if `python -m unittest` is run in the project root?
Who excepts tools/bin/dangarous.py is executed?

My conclution is:

* People shouldn't abuse PEP 420.  Omitting __init__.py is allowed only for 
namespace package.
* Namespace package should be searched based on PEP 420 rule. Don't search into 
regular directory unless it is specified.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue23882>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to