Message406700
| Author | andrei.avk |
|---|---|
| Recipients | andrei.avk, cvrebert, emilyemorehouse, joca.bt, pitrou, r.david.murray, robbuckley |
| Date | 2021-11-21.02:34:21 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1637462062.02.0.0855023170658.issue22276@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
I have also run into this when looking into path.glob('dangling_symlink') issue.
I can add a few things (in the examples, *myfile* is a file, not a directory):
This is probably more common / less obscure than '*/':
path.glob('myfile/') => True
This is inconsistent with how shell `ls` command works and with glob.glob() and looks wrong.
Path('myfile/').exists() => True
Path('myfile/') == Path('myfile') => True
str(Path('myfile/')) => 'myfile'
You can compare this to behavior of `ls` (tested on MacOS):
ls myfile
myfile
ls myfile/
ls: myfile/: Not a directory
I think many users will expect behavior consistent with `ls` and `glob.glob`. I've used `ls` in this manner before. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2021-11-21 02:34:22 | andrei.avk | set | recipients: + andrei.avk, pitrou, r.david.murray, cvrebert, joca.bt, emilyemorehouse, robbuckley |
| 2021-11-21 02:34:22 | andrei.avk | set | messageid: <1637462062.02.0.0855023170658.issue22276@roundup.psfhosted.org> |
| 2021-11-21 02:34:22 | andrei.avk | link | issue22276 messages |
| 2021-11-21 02:34:21 | andrei.avk | create | |