Title: gh-94808: Cover `%p` in `PyUnicode_FromFormat` by sobolevn · Pull Request #96677 · python/cpython · GitHub
Open Graph Title: gh-94808: Cover `%p` in `PyUnicode_FromFormat` by sobolevn · Pull Request #96677 · python/cpython
X Title: gh-94808: Cover `%p` in `PyUnicode_FromFormat` by sobolevn · Pull Request #96677 · python/cpython
Description: Source: cpython/Objects/unicodeobject.c Lines 2531 to 2552 in 4f523a7 case 'p': { char number[MAX_LONG_LONG_CHARS]; len = sprintf(number, "%p", va_arg(*vargs, void*)); assert(len >= 0); /* %p is ill-defined: ensure leading 0x. */ if (number[1] == 'X') number[1] = 'x'; else if (number[1] != 'x') { memmove(number + 2, number, strlen(number) + 1); number[0] = '0'; number[1] = 'x'; len += 2; } if (_PyUnicodeWriter_WriteASCIIString(writer, number, len) < 0) return NULL; break; } Internet says that some systems can return representation with 0x, some with 0X, and some with none. It is reflected in the implementation, but cannot be reflected in tests. Issue: gh-94808
Open Graph Description: Source: cpython/Objects/unicodeobject.c Lines 2531 to 2552 in 4f523a7 case 'p': ...
X Description: Source: cpython/Objects/unicodeobject.c Lines 2531 to 2552 in 4f523a7 case 'p': ...
Opengraph URL: https://github.com/python/cpython/pull/96677
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:c5585fb9-c0ee-ba31-ec50-ac0d3134c2c7 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 80D4:380972:1D589:284D4:69693E4A |
| html-safe-nonce | 4e10f4c627105374635d976ba724af5fc4d4dca8ae2ff2fe5b33b217a25fe5f4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEQ0OjM4MDk3MjoxRDU4OToyODRENDo2OTY5M0U0QSIsInZpc2l0b3JfaWQiOiI0NzQ4MTU4MjE1MTg0MjY4ODc0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a6fbae1be814789b0ae54e9db6cb07bc906985b278fcd68c30d5e848e9d77375 |
| hovercard-subject-tag | pull_request:1049747318 |
| 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/96677/checks |
| twitter:image | https://avatars.githubusercontent.com/u/4660275?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4660275?s=400&v=4 |
| og:image:alt | Source: cpython/Objects/unicodeobject.c Lines 2531 to 2552 in 4f523a7 case 'p': ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d |
| 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 | d69ac0477df0f87da03b8b06cebd187012d7a930 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width