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/:range(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:40678dee-91cc-cb5e-6729-d7cb55ca8c2e |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A446:1ACDA1:5179163:6DE081A:6995BA10 |
| html-safe-nonce | c7a1043ee823bd59ae340d7ef1a578152737542830626e6c8ccb213f33eea1da |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDQ2OjFBQ0RBMTo1MTc5MTYzOjZERTA4MUE6Njk5NUJBMTAiLCJ2aXNpdG9yX2lkIjoiNDMyNTk2NTI1MjMzMDYwMzY4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a2e7a94b4dc1b2e42cb27c57d05c83f624df535802433d5edfe44b26344666a1 |
| 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/4936b0dda5a5c64b39d51a938d37b2c304ea30a3 |
| 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 | db6e0566cb0ff9d4d5e42a9ea092b295227443ff414c53098b551c8f31721145 |
| 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 | 672486f3337737e98e5438ff6dc46c49119d654a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width