Skip to content

[3.11] Add additional pointers to pathlib's mapping to os.path functions (GH-94828) #94889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2022

Conversation

miss-islington
Copy link
Contributor

  • Add additional pointers to pathlib's mapping to os.path functions

os.path.splitext has a somewhat quirky signature since it mixes the path and filename components but I wanted the documentation to mention PurePath.stem as the natural counterpart to PurePath.suffix for the common use of os.path.splitext to turn "file.py" into "file" and "py".

Technically this could have some discussion of how to handle the parent directory hierarchy but that seems a bit out of keeping with the spirit of this table so I omitted mentioning PurePath.parents here.

  • Update Doc/library/pathlib.rst

Co-authored-by: Ezio Melotti [email protected]

Co-authored-by: Ezio Melotti [email protected]
(cherry picked from commit 3789c63)

Co-authored-by: Chris Adams [email protected]

…thonGH-94828)

* Add additional pointers to pathlib's mapping to os.path functions

os.path.splitext has a somewhat quirky signature since it mixes the path and filename components but I wanted the documentation to mention `PurePath.stem` as the natural counterpart to `PurePath.suffix` for the common use of `os.path.splitext` to turn "file.py" into "file" and "py".

Technically this could have some discussion of how to handle the parent directory hierarchy but that seems a bit out of keeping with the spirit of this table so I omitted mentioning `PurePath.parents` here.

* Update Doc/library/pathlib.rst

Co-authored-by: Ezio Melotti <[email protected]>

Co-authored-by: Ezio Melotti <[email protected]>
(cherry picked from commit 3789c63)

Co-authored-by: Chris Adams <[email protected]>
@miss-islington
Copy link
Contributor Author

@acdha and @ezio-melotti: Status check is done, and it's a failure ❌ .

@bedevere-bot bedevere-bot added the docs Documentation in the Doc dir label Jul 15, 2022
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

2 similar comments
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 734c8b7 into python:3.11 Jul 15, 2022
@miss-islington miss-islington deleted the backport-3789c63-3.11 branch July 15, 2022 22:21
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants