Skip to content

Conditional module imports #212

Closed
Closed

Description

@JukkaL

It would be useful to be able to import modules conditionally. Here is an example:

try:
    import _thread
except ImportError:
    import _dummy_thread as _thread

To implement this we would probably need union module types and the ability to infer them in cases such as the above.

Activity

  1. JukkaL commented on Nov 25, 2015

    @JukkaL
    CollaboratorAuthor

    We are using #649 to track this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions