[issue41737] Improper NotADirectoryError when opening a file in a fake directory

Danny Lin report at bugs.python.org
Fri Jul 30 03:59:04 EDT 2021


Danny Lin <danny0838 at gmail.com> added the comment:

> I've put up a PR that expands the docs for NotADirectoryError here: 
> https://github.com/python/cpython/pull/27471/files

Thank you.

Wouldn't it be more clear if an example is provided? Like:

(e.g. `/path/to` does not exist when running `open('/path/to/file')`)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41737>
_______________________________________


More information about the Python-bugs-list mailing list