On Tue, Jan 26, 2021 at 10:04 PM Steve Dower <steve.do...@python.org> wrote:
>
> On 1/26/2021 8:32 PM, Steve Holden wrote:
> > If the length of the name is any kind of issue, since the stdlib
> > only contains modules (and packages), why not just sys.stdlib_names?
>
> And since the modules can vary between platforms and builds, why
> wouldn't this be sysconfig.stdlib_names rather than sys.stdlib_names?

The list is the same on all platforms on purpose ;-) Example:

>>> 'winsound' in sys.stdlib_module_names
True
>>> 'ossaudiodev' in sys.stdlib_module_names
True

For example, grouping stdlib imports using sys.stdlib_module_names
gives the same output on any platform, even if there were missing
dependencies when you built Python.

Victor
-- 
Night gathers, and now my watch begins. It shall not end until my death.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/3EEZW2MYNFIE4ZE75RLOLYQC5ZUKSN2D/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to