]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Add additional pointers to pathlib's mapping to os.path functions (#94828)
authorChris Adams <chris@improbable.org>
Fri, 15 Jul 2022 22:09:27 +0000 (18:09 -0400)
committerGitHub <noreply@github.com>
Fri, 15 Jul 2022 22:09:27 +0000 (00:09 +0200)
commit3789c635772fbdeb5d0fc32aa811fd6b1d935a60
tree23b211c4caba12672e9d83670b488acdcfd54938
parent582ae86b3f07d806f145b3eb9009efd9fbf2e041
Add additional pointers to pathlib's mapping to os.path functions (#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 <ezio.melotti@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Doc/library/pathlib.rst