27 Jan
2021
27 Jan
'21
5:36 a.m.
On Tue, Jan 26, 2021 at 11:19:13PM +0100, Victor Stinner wrote:
On Tue, Jan 26, 2021 at 10:04 PM Steve Dower
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