Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional module imports #212

Closed
JukkaL opened this issue Jul 11, 2013 · 1 comment
Closed

Conditional module imports #212

JukkaL opened this issue Jul 11, 2013 · 1 comment
Labels

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented Jul 11, 2013

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.

@JukkaL
Copy link
Collaborator Author

JukkaL commented Nov 25, 2015

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
Labels
Projects
None yet
Development

No branches or pull requests

1 participant