Title: bpo-46480: rephrase typing.assert_type docs by hauntsaninja · Pull Request #32069 · python/cpython · GitHub
Open Graph Title: bpo-46480: rephrase typing.assert_type docs by hauntsaninja · Pull Request #32069 · python/cpython
X Title: bpo-46480: rephrase typing.assert_type docs by hauntsaninja · Pull Request #32069 · python/cpython
Description: 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
Open Graph Description: 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 tel...
X Description: 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 tel...
Opengraph URL: https://github.com/python/cpython/pull/32069
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:df049835-49e8-a106-c6a7-415804d2584d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 92AA:1B30D4:D51D74:126043C:696A8B41 |
| html-safe-nonce | 6c313b4a2275ceb88334e3d0e9f6c4427ae5530fe6f5c541657120933cc6804c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MkFBOjFCMzBENDpENTFENzQ6MTI2MDQzQzo2OTZBOEI0MSIsInZpc2l0b3JfaWQiOiI3MTE4ODgyNTQyMjY0NjgzMzI5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c22aa8950ec1abd444f584a6f07a307bfd730518398bbd045e0a44dde74bba22 |
| hovercard-subject-tag | pull_request:886808331 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/32069/files |
| twitter:image | https://avatars.githubusercontent.com/u/12621235?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/12621235?s=400&v=4 |
| og:image:alt | 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 tel... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d2aa6dedd7d97fa651b17c40401f2605f309df5ca5fb659bf0554cf34f1de825 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c1dbca8981c5e3d6a69bce2f1d289e732b86241d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width