[issue23076] path.glob() fails with IndexError

2014-12-17 Thread Antony Lee
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:

[issue23076] path.glob() fails with IndexError

2014-12-17 Thread liu chang
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 ipython-input-6-a6dcf250fe73,