Title: pathlib: inconsistent handling of rootless Windows paths · Issue #94909 · python/cpython · GitHub
Open Graph Title: pathlib: inconsistent handling of rootless Windows paths · Issue #94909 · python/cpython
X Title: pathlib: inconsistent handling of rootless Windows paths · Issue #94909 · python/cpython
Description: >>> from pathlib import PureWindowsPath >>> a = 'C:/a/b' >>> b = 'C:x/y' >>> PureWindowsPath(a, b) PureWindowsPath('C:x/y') >>> PureWindowsPath(a) / b PureWindowsPath('C:/a/b/x/y') Seems to be the only case where the PureWindowsPath cons...
Open Graph Description: >>> from pathlib import PureWindowsPath >>> a = 'C:/a/b' >>> b = 'C:x/y' >>> PureWindowsPath(a, b) PureWindowsPath('C:x/y') >>> PureWindowsPath(a) / b PureWindowsPath('C:/a/b/x/y') Seems to be the ...
X Description: >>> from pathlib import PureWindowsPath >>> a = 'C:/a/b' >>> b = 'C:x/y' >>> PureWindowsPath(a, b) PureWindowsPath('C:x/y') >>> ...
Opengraph URL: https://github.com/python/cpython/issues/94909
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"pathlib: inconsistent handling of rootless Windows paths","articleBody":"```python\r\n\u003e\u003e\u003e from pathlib import PureWindowsPath\r\n\u003e\u003e\u003e a = 'C:/a/b'\r\n\u003e\u003e\u003e b = 'C:x/y'\r\n\u003e\u003e\u003e PureWindowsPath(a, b)\r\nPureWindowsPath('C:x/y')\r\n\u003e\u003e\u003e PureWindowsPath(a) / b\r\nPureWindowsPath('C:/a/b/x/y')\r\n```\r\n\r\nSeems to be the only case where the `PureWindowsPath` constuctor and `joinpath()` disagree when given the same arguments. This has implications for future work, so I'd love to make them consistent.\r\n\r\nAffects all supported versions of Python.","author":{"url":"https://github.com/barneygale","@type":"Person","name":"barneygale"},"datePublished":"2022-07-16T17:53:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/94909/cpython/issues/94909"}
| 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:00214dc2-bfcc-12be-da14-396ef44f3801 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AECE:365F9C:EFF23D:13B3ABE:696B6777 |
| html-safe-nonce | 0d06e81e27c97d004811ce83b472c6809643306acf39649eaa1dc806ceb060e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRUNFOjM2NUY5QzpFRkYyM0Q6MTNCM0FCRTo2OTZCNjc3NyIsInZpc2l0b3JfaWQiOiIyNjE4NDkxMjI5Njk0NTUxOTI3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | afa48d503108bfd1378f3f847b42f88d9a3d8e47b98d768446ba5ccdf69a14c7 |
| hovercard-subject-tag | issue:1306866538 |
| 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/94909/issue_layout |
| twitter:image | https://opengraph.githubassets.com/085e4300181044b41e1f90f1fdbf4efe9fe337c59ede1c07ab12e0072022afbf/python/cpython/issues/94909 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/085e4300181044b41e1f90f1fdbf4efe9fe337c59ede1c07ab12e0072022afbf/python/cpython/issues/94909 |
| og:image:alt | >>> from pathlib import PureWindowsPath >>> a = 'C:/a/b' >>> b = 'C:x/y' >>> PureWindowsPath(a, b) PureWindowsPath('C:x/y') >>> PureWindowsPath(a) / b PureWindowsPath('C:/a/b/x/y') Seems to be the ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | barneygale |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width