[issue33392] pathlib .glob('*/') returns files as well as directories

2018-11-17 Thread E Kawashima
Change by E Kawashima : -- pull_requests: +9832 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33392] pathlib .glob('*/') returns files as well as directories

2018-05-04 Thread SilentGhost
Change by SilentGhost : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> pathlib glob ignores trailing slash in pattern ___ Python tracker

[issue33392] pathlib .glob('*/') returns files as well as directories

2018-05-04 Thread Brian Sheldon
Brian Sheldon added the comment: This appears to be a duplicate of #22276 -- nosy: +brianmsheldon ___ Python tracker ___

[issue33392] pathlib .glob('*/') returns files as well as directories

2018-05-01 Thread robbuckley
robbuckley added the comment: I checked this on Mac and Windows, pathlib and the old glob std lib behave the same on both in this respect On Tue, 1 May 2018, 18:35 Emily Morehouse, wrote: > > Emily Morehouse added the

[issue33392] pathlib .glob('*/') returns files as well as directories

2018-05-01 Thread Emily Morehouse
Emily Morehouse added the comment: Good find -- I agree that when using Path.cwd().glob('*/'), it should only return directories. This follows the original glob library's functionality as well as the Unix expectation (I believe Windows as well, but I'll double check).

[issue33392] pathlib .glob('*/') returns files as well as directories

2018-04-30 Thread robbuckley
robbuckley added the comment: this is workaroundable via constructions like: list(x for x in p.glob('*/') if x.is_dir()) but I think there's value in behaving like glob.glob(), and keystroke avoidance for what must be a fairly common use case --

[issue33392] pathlib .glob('*/') returns files as well as directories

2018-04-30 Thread robbuckley
New submission from robbuckley : Path.cwd().glob('/*') seems to yield all files and folders in cwd, the same as .glob('*'). I believe that glob('*/') should yield only directories, and glob('*') all files and directories. this behaviour isnt documented one way or the