| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The goal here is to reduce potential confusion between `assert_type(val, type)` and `assert isinstance(val, typ)`. The former is meant to ask a type checker to confirm a fact, the latter is meant to tell a type checker a fact. The behaviour of the latter more closely resembles what I'd expect from the prior phrasing of "assert [something] to the type checker".
|
(We can skip-news, since this is just docs for a new feature. This was originally brought up at python/typing#1103 ) |
Sorry, something went wrong.
This change is similar to that in python#32069
This change is similar to that in #32069
| Back | FazBrowse Home | New Git URL |
The goal here is to reduce potential confusion between
assert_type(val, typ) and assert isinstance(val, typ).
The former is meant to ask a type checker to confirm a fact, the latter
is meant to tell a type checker a fact. The behaviour of the latter more
closely resembles what I'd expect from the previous phrasing of
"assert [something] to the type checker".
https://bugs.python.org/issue46480