[Python-ideas] Add 'module' module, similar to 'keyword' module

Terry Reedy tjreedy at udel.edu
Sun Nov 1 20:10:57 EST 2015


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.

-- 
Terry Jan Reedy



More information about the Python-ideas mailing list