Skip to content

Maybe MYPY, PY2 and PY3 can be imported from typing instead of having to set them? #308

Closed
@gvanrossum

Description

@gvanrossum

I have to write code like this:

MYPY = False
if MYPY:
   # do mypy stuff

I think it would be more elegant if I could write

from typing import MYPY

instead. That way the values can actually be defined properly in the stubs and lib-typing files.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions