On 7/13/26 08:59, Rob Cliffe via Python-list wrote:
Thanks for your reply, Random.

On 13/07/2026 06:44, Random832 wrote:
On Sun, Jul 12, 2026, at 21:13, Rob Cliffe via Python-list wrote:
It seems to be that it would be useful to have a FileReadOnly error.
Currently trying to delete a read-only file raises a PermissionError,
which not especially informative, and arguably even misleading.
First of all, how is it misleading?
It is "arguably misleading" in that it suggests - at least to me - that the caller does not have the required permissions to delete the file.
Which is likely not the case.
On Windows, you by default need a file to be writable to be able to delete it, so it's exactly permission (some utilities will prompt you whether you want to remove anyway rather than failing, while others will just fail - cmd.exe says "Access is denied." - but that's an individual decision, not the OS response.

--
https://mail.python.org/mailman3//lists/python-list.python.org

Reply via email to