Title: GH-119169: Simplify `os.walk()` exception handling by barneygale · Pull Request #121435 · python/cpython · GitHub
Open Graph Title: GH-119169: Simplify `os.walk()` exception handling by barneygale · Pull Request #121435 · python/cpython
X Title: GH-119169: Simplify `os.walk()` exception handling by barneygale · Pull Request #121435 · python/cpython
Description: Handle errors from os.scandir() and ScandirIterator similarly, which lets us loop over directory entries with for. $ ./python -m timeit -s 'import os' 'list(os.walk("."))' 5 loops, best of 5: 41.5 msec per loop 5 loops, best of 5: 40.1 msec per loop # --> 3.5% faster Issue: gh-119169
Open Graph Description: Handle errors from os.scandir() and ScandirIterator similarly, which lets us loop over directory entries with for. $ ./python -m timeit -s 'import os' 'list(os.walk("."))'...
X Description: Handle errors from os.scandir() and ScandirIterator similarly, which lets us loop over directory entries with for. $ ./python -m timeit -s 'import os' 'list(os.walk(&quo...
Opengraph URL: https://github.com/python/cpython/pull/121435
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e6fc8eaf-73d4-e765-4057-4f1b039a3569 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C9AE:20019E:4C55EC:684C5A:6969DEAE |
| html-safe-nonce | b3ce26f3a12a5c06d4e18f13aac463b7125f3f6c0d905e536b42b5abd2699a88 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUFFOjIwMDE5RTo0QzU1RUM6Njg0QzVBOjY5NjlERUFFIiwidmlzaXRvcl9pZCI6IjkwNzYzMDExMzEzNjM3NzAwMzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c0798af48647a61cc533de382e1f78552cb04e0a1482804e2c7274e7eb521454 |
| hovercard-subject-tag | pull_request:1956052392 |
| 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/121435/files |
| twitter:image | https://avatars.githubusercontent.com/u/960340?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/960340?s=400&v=4 |
| og:image:alt | Handle errors from os.scandir() and ScandirIterator similarly, which lets us loop over directory entries with for. $ ./python -m timeit -s 'import os' 'list(os.walk("."))'... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| 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 | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width