`/ ".."` to go back one step
Open
- Dominant language
- Python
- Stars
- 86
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
It would be good if there was a feature to make a Path to go back one step by `new_path = some_path / ".."`.
Something like this:
```
from pathlib2 import Path
base_directory = Path("base_directory/source_directory")
data_directory = base_directory / "text_files/text_data"
print(data_directory)
```
That make this output:
```
base_directory/source_directory/text_files/text_data
```
Now with the code below:
```
file_directory = data_directory / ".."
print(file_directory)
```
Output this:
```
base_directory/source_directory/text_files/
```
Instead this:
```
base_directory/source_directory/text_files/text_data/..
```
Contributor guide
Assessment
This issue has not been assessed yet.