Add a constant that's False at runtime but True when type checking
Navigation Menu
{{ message }}
- Notifications You must be signed in to change notification settings
- Fork 290
Closed
Milestone
Description
opened
on Jun 4, 2016This would provide a standard idiom for including imports that are only necessary while type checking, see e.g. python/mypy#1646 (which currently recommends if False: import ... because that's the only way to do it).
Metadata
Metadata
Assignees
No one assigned
Labels
No labels
No labels
Projects
No projects
Milestone
Relationships
None yet
Development
No branches or pull requests
Issue actions