On Tue, Jan 26, 2021 at 11:19:13PM +0100, Victor Stinner wrote: > 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
Right. This is (I think) Steve's point: the list is inaccurate, because the existence of 'winsound' in the stdlib_module_names doesn't mean that the module 'winsound' exists. -- Steve _______________________________________________ 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/BHKOH3N2FGMTUVXT4YCJMPCOI7SWOTEU/ Code of Conduct: http://python.org/psf/codeofconduct/