Title: bpo-40334: refactor and cleanup for the PEG generators by pablogsal · Pull Request #19775 · python/cpython · GitHub
Open Graph Title: bpo-40334: refactor and cleanup for the PEG generators by pablogsal · Pull Request #19775 · python/cpython
X Title: bpo-40334: refactor and cleanup for the PEG generators by pablogsal · Pull Request #19775 · python/cpython
Description: Improvements in this PR: No more relying on the string names to deduce the types of local variables. No more threading down the names of local variables from all functions and visiting: now the code has a local variable scope with a context manager. Specially for @lysnikolaou: I have actually managed to do #19745 (comment) and now we don't need all the specialized token functions. Just one for name, string and number. Now we have a class to represent function calls, making the code a bit more explicit and carrying metadata if needed. Also helps when debugging (from experience 😉 ). Fix some mypy errors (like the fact that in add_var the variable type could actually have been None as opposed to our previous declaration). https://bugs.python.org/issue40334
Open Graph Description: Improvements in this PR: No more relying on the string names to deduce the types of local variables. No more threading down the names of local variables from all functions and visiting: now the co...
X Description: Improvements in this PR: No more relying on the string names to deduce the types of local variables. No more threading down the names of local variables from all functions and visiting: now the co...
Opengraph URL: https://github.com/python/cpython/pull/19775
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:763c7440-2a17-1fa5-9fc3-6e0e56f84d40 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DFE0:280881:CDD2D2:121577A:696A641D |
| html-safe-nonce | 276162f665c00177f22f742f6d088af6bef3466ccfde9cf828ee8744077bbd01 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERkUwOjI4MDg4MTpDREQyRDI6MTIxNTc3QTo2OTZBNjQxRCIsInZpc2l0b3JfaWQiOiIxNTQ3ODA1NjY1NzY3NjEzNDY5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2885e60626baeae63560603d96e98cb0f9a1130daa4e99531a93d01522496d52 |
| hovercard-subject-tag | pull_request:410410596 |
| 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/19775/files |
| twitter:image | https://avatars.githubusercontent.com/u/11718525?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/11718525?s=400&v=4 |
| og:image:alt | Improvements in this PR: No more relying on the string names to deduce the types of local variables. No more threading down the names of local variables from all functions and visiting: now the co... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9b7735a184970dd9333b2cbe036c8f3c0a9108c64aaa93827c5a64fc70993392 |
| 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 | 87cbd411c2982752221b5751d583a515b23bf5fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width