WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

LiteralString overload example doesn't typecheck #2090

@JelleZijlstra

Description

@JelleZijlstra

The example in https://typing.python.org/en/latest/spec/literal.html#literalstring-overloads doesn't type check in pyright because the overloads overlap unsafely. (Mypy doesn't support LiteralString; I didn't try other type checkers.)

Maybe the section can just be deleted as it doesn't specify any behavior, it's just usage examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions