[issue26113] pathlib p.match('') should return False rather than raising exception

JitterMan report at bugs.python.org
Thu Jan 14 15:16:18 EST 2016


New submission from JitterMan:

One can use '*' as an 'accept all' pattern to match(). It would be nice to also use '' as a 'reject all' pattern. These 'accept all' and 'reject all' rules are useful as defaults. Currently passing '' to match() causes an exception. While it is easy enough to catch the exception, the need to constrains the way match() must be called and makes the calling code needlessly complicated and fussy.

----------
files: example.py
messages: 258216
nosy: jitterman
priority: normal
severity: normal
status: open
title: pathlib p.match('') should return False rather than raising exception
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file41615/example.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26113>
_______________________________________


More information about the Python-bugs-list mailing list