Pablo Galindo Salgado <pablog...@gmail.com> added the comment:
> This is not the desired or expected behaviour, which would be to just return > `path` if it exists. That's the expected behaviour if the call is successful (it does not violate any pre-condition. > This behaviour is also inconsistent with the documentation which states Not IMHO, what the documentation is described is the happy path/successful call. If the pattern is invalid, it can perfectly raise and error and the documentation will still be true. > And it is in contrast to the behaviour of glob.glob, which is just fine with > the empty string, returning an empty list. This is the point that is interesting to discuss. Why is this behavior desirable? In my view, it can be the source of bugs if the user is not aware that what is placing there is an empty string. When is useful to pass something that can be an empty string?+ ---------- nosy: +pablogsal _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41560> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com