Title: bpo-38693: Use f-strings instead of str.format() within importlib by gpshead · Pull Request #17058 · python/cpython · GitHub
Open Graph Title: bpo-38693: Use f-strings instead of str.format() within importlib by gpshead · Pull Request #17058 · python/cpython
X Title: bpo-38693: Use f-strings instead of str.format() within importlib by gpshead · Pull Request #17058 · python/cpython
Description: This is a small performance improvement, especially for one or two hot places such as _handle_fromlist() that are called a lot and the str.format() method was being used just to join two strings with a '.'. Otherwise it is merely a readability improvement. This could be backported to 3.8 as it does not change any logic. I kept _ERR_MSG as an attribute in importlib._bootstrap and imp as I wasn't sure if there were other things in the world that might refer to those. They're private and could go away in 3.9 but should not within 3.8 just in case. https://bugs.python.org/issue38693
Open Graph Description: This is a small performance improvement, especially for one or two hot places such as _handle_fromlist() that are called a lot and the str.format() method was being used just to join two strings wi...
X Description: This is a small performance improvement, especially for one or two hot places such as _handle_fromlist() that are called a lot and the str.format() method was being used just to join two strings wi...
Opengraph URL: https://github.com/python/cpython/pull/17058
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:b6453281-3c00-e3d3-6555-46022a428df5 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 9656:1F16D5:A8970:D6779:6969B8C6 |
| html-safe-nonce | 6e975f73ffaa716c1e1ece1763027e97b24e45b000ab0221d8a6f63447a38c6e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjU2OjFGMTZENTpBODk3MDpENjc3OTo2OTY5QjhDNiIsInZpc2l0b3JfaWQiOiIzMTczMzI2MTczMTIyNDQzNDYyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 40c8674c4a4814e874259c931a5f3ef1a115af75811f7ec09011f7ef2a11eeb7 |
| hovercard-subject-tag | pull_request:336614035 |
| 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/python/cpython/pull/17058/checks |
| twitter:image | https://avatars.githubusercontent.com/u/68491?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/68491?s=400&v=4 |
| og:image:alt | This is a small performance improvement, especially for one or two hot places such as _handle_fromlist() that are called a lot and the str.format() method was being used just to join two strings wi... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | acedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056 |
| turbo-cache-control | no-preview |
| 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 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 | 83c08c21cdda978090dc44364b71aa5bc6dcea79 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width