[issue33739] pathlib: Allow ellipsis to appear after "/" to navigate to parent path

2018-06-02 Thread Yury Selivanov
Yury Selivanov added the comment: Since nobody likes the idea I'm withdrawing the proposal. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue33739] pathlib: Allow ellipsis to appear after "/" to navigate to parent path

2018-06-02 Thread Brett Cannon
Brett Cannon added the comment: 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

[issue33739] pathlib: Allow ellipsis to appear after "/" to navigate to parent path

2018-06-02 Thread Timo Furrer
Timo Furrer added the comment: > 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

[issue33739] pathlib: Allow ellipsis to appear after "/" to navigate to parent path

2018-06-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: 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. -- nosy: +steve.dower ___ P

[issue33739] pathlib: Allow ellipsis to appear after "/" to navigate to parent path

2018-06-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 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

[issue33739] pathlib: Allow ellipsis to appear after "/" to navigate to parent path

2018-06-01 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +6958 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue33739] pathlib: Allow ellipsis to appear after "/" to navigate to parent path

2018-06-01 Thread Yury Selivanov
New submission from Yury Selivanov : 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