[Python-ideas] Add 'module' module, similar to 'keyword' module
Brendan Barnwell
brenbarn at brenbarn.net
Sun Nov 1 20:29:28 EST 2015
On 2015-11-01 17:10, Terry Reedy wrote:
> On 10/31/2015 7:07 PM, Brendan Barnwell wrote:
>> On 2015-10-31 15:45, Terry Reedy wrote:
>>> Revised and reduced proposal: If other people would find it useful, add
>>> all_stdlib_toplevel_module_names - builtin_module_names to sys as
>>> something equivalent to .other_stdlib_module_names or
>>> .python_coded_module_names. Anyone wanting all_toplevel_module names
>>> could add the two. Or add the latter, and let others subtract.
>>
>> One thing I've sometimes wondered about for Python 4000 is the idea
>> of putting the whole standard library under a single top-level package
>> (e.g., from stdlib import sys). This would be a big change but would
>> reduce the surprises that can arise from stdlib modules named things
>> like "string", "parser", etc. I see a brief mention of this in PEP 3108
>> but that's it. Was there more discussion of the idea?
>
> It has been discussed and rejected by Guido. I think it would be more
> sensible to require 'from . import mymod' for local imports.
That doesn't handle the situation where you want to import a
third-party module that is neither part of the stdlib nor part of your
own project. But I guess my question is answered anyhow.
--
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is no
path, and leave a trail."
--author unknown
More information about the Python-ideas
mailing list