Title: Move compiled regular expressions in platform.py into cached methods · Issue #103977 · python/cpython · GitHub
Open Graph Title: Move compiled regular expressions in platform.py into cached methods · Issue #103977 · python/cpython
X Title: Move compiled regular expressions in platform.py into cached methods · Issue #103977 · python/cpython
Description: In platform.py there are several regular expressions compiled during import that might not be used at all. The regular expressions are only called once at most, since they are called from without cached metods. We can eliminate the cost ...
Open Graph Description: In platform.py there are several regular expressions compiled during import that might not be used at all. The regular expressions are only called once at most, since they are called from without c...
X Description: In platform.py there are several regular expressions compiled during import that might not be used at all. The regular expressions are only called once at most, since they are called from without c...
Opengraph URL: https://github.com/python/cpython/issues/103977
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Move compiled regular expressions in platform.py into cached methods","articleBody":"In `platform.py` there are several regular expressions compiled during import that might not be used at all. The regular expressions are only called once at most, since they are called from without cached metods. We can eliminate the cost of compilation by moving the regular expressions into the methods.\r\n\r\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-103981\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/eendebakpt","@type":"Person","name":"eendebakpt"},"datePublished":"2023-04-28T18:43:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/103977/cpython/issues/103977"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3efb45a1-97ce-6e53-4ca3-d747e6c0232a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B4B8:CE9E9:8DBDC9:C69F4F:696A1767 |
| html-safe-nonce | 4e01a19e0afa5ed897819592a766495ac0086251edbb661c7f77d18e183cfcfa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNEI4OkNFOUU5OjhEQkRDOTpDNjlGNEY6Njk2QTE3NjciLCJ2aXNpdG9yX2lkIjoiMjM4MDcyODEzNjYwOTk2MTgzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 21e9e1397cacdc2cea81371ace1dfad30b5582f9fe85caf76fa6acbb2a9c1df3 |
| hovercard-subject-tag | issue:1688986163 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/cpython/103977/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fdbe418a69d5448f49452ec629dc336100bcf1bf74040373f2afd14a8c54cefe/python/cpython/issues/103977 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fdbe418a69d5448f49452ec629dc336100bcf1bf74040373f2afd14a8c54cefe/python/cpython/issues/103977 |
| og:image:alt | In platform.py there are several regular expressions compiled during import that might not be used at all. The regular expressions are only called once at most, since they are called from without c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | eendebakpt |
| hostname | github.com |
| expected-hostname | github.com |
| None | 34a52bd10bd674f68e5c1b6b74413b79bf2ca20c551055ace3f7cdd112803923 |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e8bd37502700f365b18a4d39acf7cb7947e11b1a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width