[issue30503] It should be possible to use a module name with the same name as a package name

2017-05-30 Thread Nick Coghlan
Nick Coghlan added the comment: As Steven notes, packages are simply modules that reserve the right to contain other submodules As a result, Python considers "aaa.py", "aaa.pyc", "aaa.", "aaa/__init__.py", and "aaa/__init__.pyc" all to be candidate filesystem mappings for a module named

[issue30503] It should be possible to use a module name with the same name as a package name

2017-05-29 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is just module shadowing in action. If you have two or more modules, or packages, in the module search path, the first one found will block access to the others. > this is a bad design in my opinion. *shrug* It is what it is. Often it is inconvenient.

[issue30503] It should be possible to use a module name with the same name as a package name

2017-05-29 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue30503] It should be possible to use a module name with the same name as a package name

2017-05-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker ___

[issue30503] It should be possible to use a module name with the same name as a package name

2017-05-29 Thread Håkon Hægland
New submission from Håkon Hægland: I have the following folder structure: . ├── aaa │   ├── bbb │   │   ├── ccc.py │   │   └── __init__.py │   ├── bbb.py │   └── __init__.py ├── __init__.py └── t.py ./t.py: import sys sys.path = ['.'] import aaa.bbb print(aaa.bbb.get_name()) ./aaa/bbb.py: