Add a constant that's False at runtime but True when type checking · Issue #230 · python/typing (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@gvanrossum

Description

@gvanrossum

This 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

Development

No branches or pull requests

Issue actions