liu chang added the comment:
In[6]: pathlib.Path.glob("")
Traceback (most recent call last):
File
"/home/liuchang/ENV3/lib/python3.4/site-packages/IPython/core/interactiveshell.py",
line 2883, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
pathlib
New submission from Antony Lee:
glob.glob returns an empty list when passed an empty pattern as argument, but
pathlib's Path.glob fails with IndexError. The first option seems more
reasonable (or at least it should be a ValueError).
--
components: Library (Lib)
messages: 232841
nosy: