Repository navigation
gh-162326: Clarify Windows FileExistsError message for directories - #162333
makwana-akshat wants to merge 1 commit into
Conversation
Documentation build overview
|
|
I've added a documentation note explaining why Windows may report "Cannot create a file when that file already exists" even when the operation involves creating a directory. I also wanted to ask whether it would be worth improving the actual error message rather than only documenting the behavior. I understand that the message comes from the Windows operating system ( Would it be feasible and appropriate to provide a more descriptive error message specifically for directory-creation operations, or is documenting the existing behavior the preferred approach? If a runtime change is considered appropriate, I'd be happy to investigate and work on it separately. I'd appreciate the maintainers' guidance. Thanks! |
Summary
Clarify the Windows-specific
FileExistsErrormessage when attempting to create a directory that already exists.On Windows, the operating system may report "Cannot create a file when that file already exists" even when the operation involves a directory.
This PR adds a short note to the
FileExistsErrordocumentation explaining this behavior and referencingOSError.strerror.Changes
Doc/builtins/exceptions.rst.Testing
git diff --check upstream/main— passed.Doc/builtins/exceptions.rstwas modified.Closes #162326