We can allow using ... to navigate the "parent" path: >>> import pathlib >>> p = pathlib.Path('a/b/c') >>> p PosixPath('a/b/c') >>> p / ... PosixPath('a/b') >>> p / ... / ... / 'temp' PosixPath('a/temp') The patch is trivial and I think that using "..." instead of ".parent" makes code clearer and cuter.
Note that 'a/b/c/..' is not the same as 'a/b' if 'c' is a link. And since "p / ..." looks very similar to "p / '..'", it will cause mistakes. "p.parent" is more explicit. AFAIK in cmd.exe on Windows 'a/b/c/...' means 'a/b/c/../..'. This is yet one source of confusion.
I've just tried, "..." doesn't seem to mean anything on the Windows CLI. But I agree with the reservation that having "..." mean something different than ".." is a recipe for confusion.
> I've just tried, "..." doesn't seem to mean anything on the Windows CLI. It's not only about Windows / Linux here - it's about the shell and command which is being used. If we talk about "cd" for example - it's a builtin in most common shells on Linux, which behave differently: bash: /a/b/c $ cd ... bash: cd: ...: No such file or directory dash: /a/b/c $ cd ... dash: 8: cd: can't cd to ... zsh: /a/b/c $ cd ... /a $ I think using '...' to navigate to the parent is confusing. It's well known and agreed that '..' is for navigating to the parent. '...' looks similar but is definitely not the same as '..' and therefore shouldn't be treated as such.
I'm personally not loving the idea either by re-purposing Ellipsis for this since my brain keeps thinking you're trying to go two levels up instead of just one with that extra dot. It should also be mentioned that paths ending in an ellipsis has actual meaning in Perforce when it comes at the end of a path.