Title: Fix PyNumber::boolean by youknowone · Pull Request #6111 · RustPython/RustPython · GitHub
Open Graph Title: Fix PyNumber::boolean by youknowone · Pull Request #6111 · RustPython/RustPython
X Title: Fix PyNumber::boolean by youknowone · Pull Request #6111 · RustPython/RustPython
Description: Summary by CodeRabbit Bug Fixes Corrected boolean evaluation for integers, floats, and complex numbers: non‑zero values now evaluate to True and zero to False. Ensures conditionals, loops, and truthiness checks behave consistently with Python’s expectations across numeric types. Prevents unexpected True results for zero values, improving reliability in control flow and filtering. No user-facing API changes; only behavior of numeric truthiness was corrected.
Open Graph Description: Summary by CodeRabbit Bug Fixes Corrected boolean evaluation for integers, floats, and complex numbers: non‑zero values now evaluate to True and zero to False. Ensures conditionals, loops, and tr...
X Description: Summary by CodeRabbit Bug Fixes Corrected boolean evaluation for integers, floats, and complex numbers: non‑zero values now evaluate to True and zero to False. Ensures conditionals, loops, and tr...
Opengraph URL: https://github.com/RustPython/RustPython/pull/6111
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:167bcaae-6fbc-29a2-21c8-047ab3db3a8b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8D14:F74F6:20A01C:2C9C2D:696AA24F |
| html-safe-nonce | eaf955f9e82aef4552b9208edce49f6a947b10a84d8279201b9d78104af6b422 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDE0OkY3NEY2OjIwQTAxQzoyQzlDMkQ6Njk2QUEyNEYiLCJ2aXNpdG9yX2lkIjoiNzEyMTI4OTk1NzMzMzQ0MzE1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 15096b1223d272418bfdcd344af952fdaed52e0ab16ff3183da0b9d73aae1758 |
| hovercard-subject-tag | pull_request:2773863690 |
| 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/RustPython/RustPython/pull/6111/files |
| twitter:image | https://avatars.githubusercontent.com/u/69878?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/69878?s=400&v=4 |
| og:image:alt | Summary by CodeRabbit Bug Fixes Corrected boolean evaluation for integers, floats, and complex numbers: non‑zero values now evaluate to True and zero to False. Ensures conditionals, loops, and tr... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a51f97dbb9326f71c08ecb61577457d543c602124d1a2672871258ef37ac5261 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| 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 | 4bd0eac606c70914085176ef312ebdcd97a8cdf1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width