New submission from Maxim Egorushkin <maxim.yegorush...@gmail.com>:
Problem: `glob.glob` documentation states that "pathname ... can contain shell-style wildcards." However, it stops short of saying that shell-style wildcards are handled the same way as in a POSIX-compliant/friendly shell. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13_02 POSIX requires that "`*` (asterisk) is a pattern that shall match any string, including the null string." However, `glob.glob` pattern `*` (asterisk) doesn't match an empty/null string. Reproduction: $ ls *.bash_profile .bash_profile $ python3 -c 'import glob; print(glob.glob("*.bash_profile"))' [] $ python3 -c 'import glob; print(glob.glob(".bash_profile"))' ['.bash_profile'] ---------- components: Library (Lib) messages: 395545 nosy: max0x7ba priority: normal severity: normal status: open title: glob.glob handling of * (asterisk) wildcard is broken versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44380> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com