Title: Change __name__ to '__main__' by afrieder · Pull Request #692 · bpython/bpython · GitHub
Open Graph Title: Change __name__ to '__main__' by afrieder · Pull Request #692 · bpython/bpython
X Title: Change __name__ to '__main__' by afrieder · Pull Request #692 · bpython/bpython
Description: The behavior of other repls (python and ipython) is to set __name__ to '__main__'. You can test this by simply printing __name__ or by running bpython on some file that has a __name__ == '__main__' guard. This was first changed in #506 but as noted in that issue, the original reason for changing has been lost. Since __name__ == '__main__' is so common (it appears 16 times in this codebase alone), it's a significant annoyance to not be able to run files in bpython with that guard. I request you change it back to this more useful behavior.
Open Graph Description: The behavior of other repls (python and ipython) is to set __name__ to '__main__'. You can test this by simply printing __name__ or by running bpython on some file that has a __name__ == &...
X Description: The behavior of other repls (python and ipython) is to set __name__ to '__main__'. You can test this by simply printing __name__ or by running bpython on some file that has a __nam...
Opengraph URL: https://github.com/bpython/bpython/pull/692
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:ae0fd2e4-ae33-9b23-d7a7-f1bddb4deaab |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | E290:186E38:72E73:99940:6969543E |
| html-safe-nonce | 9a1110d841678fdc987f05a618d1b2562fffccb7e98d623e2543fe7ba318703d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjkwOjE4NkUzODo3MkU3Mzo5OTk0MDo2OTY5NTQzRSIsInZpc2l0b3JfaWQiOiIyNDU5NDczOTEzODUwNzEzMTUwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | eca09a5d3337ee8ccff5d28bcf1d6de989fc93cf5168abae5a44909225810b7d |
| hovercard-subject-tag | pull_request:129543874 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/bpython/bpython/pull/692/checks |
| twitter:image | https://avatars.githubusercontent.com/u/8473729?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/8473729?s=400&v=4 |
| og:image:alt | The behavior of other repls (python and ipython) is to set __name__ to '__main__'. You can test this by simply printing __name__ or by running bpython on some file that has a __name__ == &... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9db5f28da7e24035385d7f349f17890cbe016a939ddd7952be0f07b862094f5a |
| turbo-cache-control | no-preview |
| go-import | github.com/bpython/bpython git https://github.com/bpython/bpython.git |
| octolytics-dimension-user_id | 8071396 |
| octolytics-dimension-user_login | bpython |
| octolytics-dimension-repository_id | 21508865 |
| octolytics-dimension-repository_nwo | bpython/bpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21508865 |
| octolytics-dimension-repository_network_root_nwo | bpython/bpython |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4e59fe66217d3c72925af2a341ae3a8f2b5b5b2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width