]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Improve assert_type phrasing (#104081)
authorShantanu <12621235+hauntsaninja@users.noreply.github.com>
Tue, 2 May 2023 06:05:25 +0000 (23:05 -0700)
committerGitHub <noreply@github.com>
Tue, 2 May 2023 06:05:25 +0000 (23:05 -0700)
commit82ba6ce303d04a7b21034e38d220e23ca9f1dc0a
treed80b5e3bb6db8d8dc5e5e93c6fcbe17e081406c0
parentf0ad4567319ee4ae878d570ab7709ab63df9123e
Improve assert_type phrasing (#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`.
Doc/library/typing.rst
Lib/typing.py