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/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:1be6e8c1-615b-6b33-dd36-e372d5f3ea43 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 89FE:2A4F6:B4770:F4ECE:69695481 |
| html-safe-nonce | aa141f233132669c6a6c9dd59764f3126ed1b5c2b2d2e3c867b5e50411dd43e6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUZFOjJBNEY2OkI0NzcwOkY0RUNFOjY5Njk1NDgxIiwidmlzaXRvcl9pZCI6Ijc0MTQwNzU5MzIyODE0OTI2MDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4de73b3de338f12e0a7f64c496025920d8ebd691d3a7db0ae0baa6b5116788c3 |
| hovercard-subject-tag | pull_request:129543874 |
| 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/bpython/bpython/pull/692/files |
| 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 |
| diff-view | unified |
| 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 |
| disable-turbo | true |
| 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