Carsten <carsten.kn...@posteo.de> added the comment:

This is a good explanation. Indeed Windows complains if I manually want to 
create a file "aux.txt" ("This device name is not allowed").

If I want to copy-paste such a file from within a zip-file (Windows Explorer 
can open zip files) I get an "Unexpected Error".


I think a descriptive error message would be very helpful here. The best 
mechanism would be if this was generated on system level and then just passed 
through by io.open to the generated Exception. But just throwing a 
"FileNotFoundError" without any hint is potentially frustrating.

Suggestion for a better Error message: "Could neither open nor create the 
desired file. Maybe the filename is not allowed by the underlying os".

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37515>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to