Why exception from os.path.exists()?

Marko Rauhamaa marko at pacujo.net
Mon Jun 11 04:35:02 EDT 2018


Antoon Pardon <antoon.pardon at vub.be>:
> On 11-06-18 02:28, Steven D'Aprano wrote:
>> The *whole point* of o.p.exists is to return False, not raise an
>> exception.
>
> And the price is that it will not always give the correct answer.

Yes, but that's still the point of the function's existence.


Marko



More information about the Python-list mailing list