Skip to content

PEP 724: Add the Rationale section #3447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 23, 2023
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions peps/pep-0724.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ The following code sample demonstrates both of these limitations.
return ``TypeGuard`` type was not a subtype of the input type. Refer to
:pep:`647` for examples.

Rationale
=========

There are a number of issues where a stricter ``TypeGuard`` would have
been a solution:

* `Python typing issue <https://github.com/python/typing/issues/1351>`__
* `Pyright issue <https://github.com/microsoft/pyright/issues/3450>`__
* `Pyright issue <https://github.com/microsoft/pyright/issues/3466>`__
* `Mypy issue <https://github.com/python/mypy/issues/15305>`__
* `Mypy issue <https://github.com/python/mypy/issues/15520>`__
* `Typeshed issue <https://github.com/python/typeshed/issues/8009>`__


Specification
=============
Expand Down