Why exception from os.path.exists()?

Peter J. Holzer hjp-python at hjp.at
Wed Jun 13 18:10:05 EDT 2018


On 2018-06-13 23:56:09 +0300, Marko Rauhamaa wrote:
> "Peter J. Holzer" <hjp-python at hjp.at>:
> > POSIX specifies a number of error codes which can be returned by stat():
[...]
> > So none of these is a good choice for the errno parameter of an OSError
> > to be thrown.
> 
> The natural errno value would be EINVAL, which is returned whenever a
> system call is invoked with an illegal argument.

And you present it like it's a new idea, after I have already discussed
the pros and cons of that twice (the second time in the very message you
just replied to, except that decided to not quote that part but some
other part ...)

        hp

-- 
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp at hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20180614/b60c8a41/attachment.sig>


More information about the Python-list mailing list