◐ Shell
clean mode source ↗

Improve assert_type phrasing by hauntsaninja · Pull Request #104081 · python/cpython

I'd like to make the fact that this does nothing at runtime
really obvious, since I suspect this is unintuitive for users who are
unfamiliar with static type checking.

I thought of this because of
https://discuss.python.org/t/add-arg-check-type-to-types/26384
wherein I'm skeptical that the user really did want `assert_type`.

JelleZijlstra

JelleZijlstra

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

May 2, 2023
I'd like to make the fact that this does nothing at runtime
really obvious, since I suspect this is unintuitive for users who are
unfamiliar with static type checking.

I thought of this because of
https://discuss.python.org/t/add-arg-check-type-to-types/26384
wherein I'm skeptical that the user really did want `assert_type`.
(cherry picked from commit 82ba6ce)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>

AlexWaygood pushed a commit that referenced this pull request

May 2, 2023
Improve assert_type phrasing (GH-104081)

I'd like to make the fact that this does nothing at runtime
really obvious, since I suspect this is unintuitive for users who are
unfamiliar with static type checking.

I thought of this because of
https://discuss.python.org/t/add-arg-check-type-to-types/26384
wherein I'm skeptical that the user really did want `assert_type`.
(cherry picked from commit 82ba6ce)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>

carljm added a commit to carljm/cpython that referenced this pull request

May 2, 2023

carljm added a commit to carljm/cpython that referenced this pull request

May 2, 2023