[Python-ideas] Allow multiple imports from a package while preserving its namespace
Serhiy Storchaka
storchaka at gmail.com
Thu Apr 26 11:11:40 EDT 2018
> The following works today:
>
> Python 3.6.3 (default, Oct 4 2017, 06:09:15)
> [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import os.path
> >>> os
> <module 'os' from
> '/Users/pradyunsg/.venvwrap/venvs/pip/bin/../lib/python3.6/os.py'>
> >>> os.path
> <module 'posixpath' from
> '/Users/pradyunsg/.venvwrap/venvs/pip/bin/../lib/python3.6/posixpath.py'>
>
> I am not sure what you're asking for here.
os.path is a very special case.
First at all there are no the os/path.py file...
More information about the Python-ideas
mailing list