What behavior would you expect?

Jason Friedman jsf80238 at gmail.com
Fri Feb 20 00:49:14 EST 2015


I think I came in a little late, and saw "2. no files match the given
> pattern," in which case I'm sticking to my story and returning an empty
> list.
>
> The original problem was "to search a directory and return the name of
> the most recent file matching a given pattern."  I'd still prefer an
> exception to None, and we agree on that an empty string is bad because
> it's not a non-string and it could be too easily mistaken for a
> filename.
>
>
Agreed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150219/b193bf32/attachment.html>


More information about the Python-list mailing list