Irit Katriel <iritkatr...@gmail.com> added the comment:
path.glob() returns a generator now, but the contents are still this exception: >>> from pathlib import Path >>> path = Path('./myfile.txt') >>> >>> path.glob('') <generator object Path.glob at 0x1059abc50> >>> list(path.glob('')) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/iritkatriel/src/cpython-654/Lib/pathlib.py", line 1027, in glob raise ValueError("Unacceptable pattern: {!r}".format(pattern)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: Unacceptable pattern: '' >>> I'm changing the type as crash typically refers to segfaults or hangs and not exceptions reporting errors in input. ---------- nosy: +iritkatriel type: crash -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8 _______________________________________ 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