Skip to content

Spec Change : Additional detail and option for platform checks. #52

@Josverl

Description

@Josverl

Hello Typing council,

Please consider the proposal in the PR and Discussion below.

The Discussion has overal positive feedback, but did not receive concrete feedback on the refinement and implementation questions posed, so Ill repeat them here so the PR can be adjusted as needed based on the feedback.

Open Questions:

Scope of sys.platform collections:

  • Should typecheckers support any iterable, or limit to tuple or set literals?
    Recommend: Only tuple literals; Optionally set literals if feasible for type checkers

  • Should typecheckers support not in checks?
    Recommend: Yes

sys.implementation attributes:

  • Should typecheckers support sys.implementation.version comparisons (similar to sys.version_info)?
    No preference.

Combining version, platform, and implementation checks:

  • Should typecheckers explicitly allow combined checks , (e.g., if sys.platform == "linux" and sys.implementation.name == "pypy":)?
    Recommend: Yes, as long as each individual check is supported. This is not explicitly specified in the proposed text, as the implementation complexity for type checkers needs further assessment.

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