Skip to content

Make module suggestion avaliable on built-in modules #146401

@Locked-chess-official

Description

@Locked-chess-official

Feature or enhancement

Proposal:

Add BuiltinImporter.discover to make it:

class BuiltinImporter:
    @staticmethod
    def discover(spec=None):
        if spec is not None: # assume that built-in modules have no submodule
            return
        yield from sys.builtin_module_names

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions