Skip to content

[3.13] GH-119054: Add "Expanding and resolving paths" section to pathlib docs. (GH-120970)#121155

Merged
barneygale merged 1 commit into
python:3.13from
miss-islington:backport-d6d8707-3.13
Jun 29, 2024
Merged

[3.13] GH-119054: Add "Expanding and resolving paths" section to pathlib docs. (GH-120970)#121155
barneygale merged 1 commit into
python:3.13from
miss-islington:backport-d6d8707-3.13

Conversation

@miss-islington

@miss-islington miss-islington commented Jun 29, 2024

Copy link
Copy Markdown
Contributor

Add dedicated subsection for home(), expanduser(), cwd(),
absolute(), resolve() and readlink(). The position of this section
keeps all the Path constructors (Path(), Path.from_uri(),
Path.home() and Path.cwd()) near the top. Within the section, closely
related methods are kept adjacent. Specifically:

-.home() and expanduser() (the former calls the latter)

  • cwd() and absolute() (the former calls the latter)
  • absolute() and resolve() (both make paths absolute)
  • resolve() and readlink() (both read symlink targets)
  • Ditto cwd() and absolute()
  • Ditto absolute() and resolve()

The "Other methods" section is removed.
(cherry picked from commit d6d8707)

Co-authored-by: Barney Gale barney.gale@gmail.com


📚 Documentation preview 📚: https://cpython-previews--121155.org.readthedocs.build/

…ib docs. (pythonGH-120970)

Add dedicated subsection for `home()`, `expanduser()`, `cwd()`,
`absolute()`, `resolve()` and `readlink()`. The position of this section
keeps all the `Path` constructors (`Path()`, `Path.from_uri()`,
`Path.home()` and `Path.cwd()`) near the top. Within the section, closely
related methods are kept adjacent. Specifically:

-.`home()` and `expanduser()` (the former calls the latter)
- `cwd()` and `absolute()` (the former calls the latter)
- `absolute()` and `resolve()` (both make paths absolute)
- `resolve()` and `readlink()` (both read symlink targets)
- Ditto `cwd()` and `absolute()`
- Ditto `absolute()` and `resolve()`

The "Other methods" section is removed.
(cherry picked from commit d6d8707)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
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 news topic-pathlib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants