Skip to content

Clarification on imports of Final variables #42

Open
@erictraut

Description

@erictraut

I'm submitting a request for TC review and approval of an addition to the typing spec that clarifies the intended behavior of imports that target Final variables.

As noted in the Python Forum discussion, pyright and mypy already implement the specified behavior. I have not yet checked pytype or pyre.

In the discussion, a few participants indicated that they wouldn't expect Final to propagate on import, but the majority consensus appears to be in favor. Jukka also pointed out that mypy was the reference implementation for PEP 591, and although this behavior wasn't spelled out in PEP 591, it was the intended behavior.

TC Sign-off

  • Carl
  • Eric
  • Jelle
  • Jukka
  • Rebecca

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions