Content-Length: 294839 | pFad | https://github.com/python/typing/issues/230

2B Add a constant that's False at runtime but True when type checking · Issue #230 · python/typing · GitHub
Skip to content

Add a constant that's False at runtime but True when type checking #230

@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

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/typing/issues/230

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy